diff options
-rw-r--r-- | src/opengl/doc/images/openglwindow-example.png (renamed from examples/gui/doc/images/openglwindow-example.png) | bin | 19920 -> 19920 bytes | |||
-rw-r--r-- | src/opengl/doc/qtopengl.qdocconf | 3 | ||||
-rw-r--r-- | src/opengl/qopenglversionfunctions.cpp | 8 | ||||
-rw-r--r-- | src/opengl/qopenglversionfunctionsfactory.cpp | 8 |
4 files changed, 14 insertions, 5 deletions
diff --git a/examples/gui/doc/images/openglwindow-example.png b/src/opengl/doc/images/openglwindow-example.png Binary files differindex 63ba4ed2f4..63ba4ed2f4 100644 --- a/examples/gui/doc/images/openglwindow-example.png +++ b/src/opengl/doc/images/openglwindow-example.png diff --git a/src/opengl/doc/qtopengl.qdocconf b/src/opengl/doc/qtopengl.qdocconf index 857ad46c8f..f225e19df2 100644 --- a/src/opengl/doc/qtopengl.qdocconf +++ b/src/opengl/doc/qtopengl.qdocconf @@ -19,7 +19,8 @@ sourcedirs += .. \ exampledirs += ../../../examples/opengl \ . \ snippets \ - .. + .. \ + ../../gui/doc/snippets imagedirs += images \ ../../../examples/opengl/doc/images diff --git a/src/opengl/qopenglversionfunctions.cpp b/src/opengl/qopenglversionfunctions.cpp index 64d9d11218..487bc56b48 100644 --- a/src/opengl/qopenglversionfunctions.cpp +++ b/src/opengl/qopenglversionfunctions.cpp @@ -247,9 +247,9 @@ void QAbstractOpenGLFunctionsPrivate::removeExternalFunctions(QOpenGLContext *co A pointer to an object of the class corresponding to the version and profile of OpenGL in use can be obtained from - QOpenGLContext::versionFunctions(). If obtained in this way, note that - the QOpenGLContext retains ownership of the object. This is so that only - one instance need be created. + QOpenGLVersionFunctionsFactory::get(). If obtained in this way, note that + the QOpenGLContext retains ownership of the object. This is so that the + instance can be cached and shared. Before calling any of the exposed OpenGL functions you must ensure that the object has resolved the function pointers to the OpenGL functions. This @@ -266,7 +266,7 @@ void QAbstractOpenGLFunctionsPrivate::removeExternalFunctions(QOpenGLContext *co profile. This is obviously a lot easier to debug than undefined behavior at run time. - \sa QOpenGLContext::versionFunctions() + \sa QOpenGLVersionFunctionsFactory::get() */ /*! Constructs a QAbstractOpenGLFunctions object. diff --git a/src/opengl/qopenglversionfunctionsfactory.cpp b/src/opengl/qopenglversionfunctionsfactory.cpp index d377c64961..6415c9439f 100644 --- a/src/opengl/qopenglversionfunctionsfactory.cpp +++ b/src/opengl/qopenglversionfunctionsfactory.cpp @@ -162,6 +162,14 @@ static QAbstractOpenGLFunctions *createFunctions(const QOpenGLVersionProfile &ve } /*! + \class QOpenGLVersionFunctionsFactory + \inmodule QtOpenGL + \since 6.0 + \brief Provides access to OpenGL functions for a specified version and + profile. +*/ + +/*! \fn static T *QOpenGLVersionFunctionsFactory::get(QOpenGLContext *context) \overload get() |