Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QOpenGLVersionFunctionsFactory Class Reference

\inmodule QtOpenGL More...

#include <qopenglversionfunctionsfactory.h>

+ Collaboration diagram for QOpenGLVersionFunctionsFactory:

Static Public Member Functions

static QAbstractOpenGLFunctionsget (const QOpenGLVersionProfile &versionProfile=QOpenGLVersionProfile(), QOpenGLContext *context=nullptr)
 Returns a pointer to an object that provides access to all functions for the versionProfile of the context.
 
template<class TYPE >
static TYPEget (QOpenGLContext *context=nullptr)
 

Detailed Description

\inmodule QtOpenGL

Since
6.0

Provides access to OpenGL functions for a specified version and profile.

Definition at line 25 of file qopenglversionfunctionsfactory.h.

Member Function Documentation

◆ get() [1/2]

QAbstractOpenGLFunctions * QOpenGLVersionFunctionsFactory::get ( const QOpenGLVersionProfile & versionProfile = QOpenGLVersionProfile(),
QOpenGLContext * context = nullptr )
static

Returns a pointer to an object that provides access to all functions for the versionProfile of the context.

There is no need to call QAbstractOpenGLFunctions::initializeOpenGLFunctions() as long as the context is current. It is also possible to call this function when the context is not current, but in that case it is the caller's responsibility to ensure proper initialization by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions() afterwards.

Usually one would use the template version of this function to automatically have the result cast to the correct type.

Definition at line 197 of file qopenglversionfunctionsfactory.cpp.

References QSet< T >::constEnd(), QSet< T >::constFind(), context, QSurfaceFormat::CoreProfile, createFunctions(), QOpenGLContext::currentContext(), QOpenGLContextVersionData::forContext(), funcs, QOpenGLVersionProfile::hasProfiles(), QOpenGLVersionProfile::isLegacyVersion(), QOpenGLVersionProfile::isValid(), it, QOpenGLVersionProfile::profile(), qMakePair(), qWarning, and QOpenGLVersionProfile::version().

+ Here is the call graph for this function:

◆ get() [2/2]

template<class TYPE >
static TYPE * QOpenGLVersionFunctionsFactory::get ( QOpenGLContext * context = nullptr)
inlinestatic

Definition at line 30 of file qopenglversionfunctionsfactory.h.

References context, get(), and TYPE.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: