The QOpenGLVersionProfile class represents the version and if applicable the profile of an OpenGL context. 更多...
| 頭: | #include <QOpenGLVersionProfile> |
| qmake: | QT += gui |
| Since: | Qt 5.1 |
該類在 Qt 5.1 引入。
| QOpenGLVersionProfile (const QOpenGLVersionProfile & other ) | |
| QOpenGLVersionProfile (const QSurfaceFormat & format ) | |
| QOpenGLVersionProfile () | |
| QOpenGLVersionProfile & | operator= (const QOpenGLVersionProfile & rhs ) |
| ~QOpenGLVersionProfile () | |
| bool | hasProfiles () const |
| bool | isLegacyVersion () const |
| bool | isValid () const |
| QSurfaceFormat::OpenGLContextProfile | profile () const |
| void | setProfile (QSurfaceFormat::OpenGLContextProfile profile ) |
| void | setVersion (int majorVersion , int minorVersion ) |
| QPair<int, int> | version () const |
An object of this class can be passed to QOpenGLContext::versionFunctions () to request a functions object for a specific version and profile of OpenGL.
It also contains some helper functions to check if a version supports profiles or is a legacy version.
構造副本為 other .
Creates a QOpenGLVersionProfile object initialised with the version and profile from format .
Creates a default invalid QOpenGLVersionProfile object.
Assigns the version and profile of rhs 到此 QOpenGLVersionProfile 對象。
銷毀 QOpenGLVersionProfile 對象。
返迴
true
if profiles are supported by the OpenGL version returned by
version
(). Only OpenGL versions >= 3.2 support profiles.
返迴
true
is the OpenGL version returned by
version
() contains deprecated functions and does not support profiles i.e. if the OpenGL version is <= 3.1.
返迴
true
if the version number is valid. Note that for a default constructed
QOpenGLVersionProfile
object this function will return
false
.
另請參閱 setVersion () 和 version ().
Returns the OpenGL profile. Only makes sense if profiles are supported by this version.
另請參閱 setProfile ().
Sets the OpenGL profile profile . Only makes sense if profiles are supported by this version.
另請參閱 profile ().
Sets the major and minor version numbers to majorVersion and minorVersion 分彆。
另請參閱 version ().
返迴 QPair <int,int> where the components represent the major and minor OpenGL version numbers respectively.
另請參閱 setVersion ().