QOpenGLVersionProfile#
The QOpenGLVersionProfile
class represents the version and if applicable the profile of an OpenGL context. More…
Synopsis#
Functions#
def
hasProfiles
()def
isLegacyVersion
()def
isValid
()def
__ne__
(rhs)def
__eq__
(rhs)def
profile
()def
setProfile
(profile)def
setVersion
(majorVersion, minorVersion)def
version
()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
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.
- class PySide6.QtOpenGL.QOpenGLVersionProfile#
PySide6.QtOpenGL.QOpenGLVersionProfile(other)
PySide6.QtOpenGL.QOpenGLVersionProfile(format)
- Parameters:
format –
PySide6.QtGui.QSurfaceFormat
Creates a default invalid QOpenGLVersionProfile
object.
Constructs a copy of other
.
Creates a QOpenGLVersionProfile
object initialised with the version and profile from format
.
- PySide6.QtOpenGL.QOpenGLVersionProfile.hasProfiles()#
- Return type:
bool
Returns true
if profiles are supported by the OpenGL version returned by version()
. Only OpenGL versions >= 3.2 support profiles.
- PySide6.QtOpenGL.QOpenGLVersionProfile.isLegacyVersion()#
- Return type:
bool
Returns 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.
- PySide6.QtOpenGL.QOpenGLVersionProfile.isValid()#
- Return type:
bool
Returns true
if the version number is valid. Note that for a default constructed QOpenGLVersionProfile
object this function will return false
.
See also
- PySide6.QtOpenGL.QOpenGLVersionProfile.__ne__(rhs)#
- Parameters:
- Return type:
bool
- PySide6.QtOpenGL.QOpenGLVersionProfile.__eq__(rhs)#
- Parameters:
- Return type:
bool
- PySide6.QtOpenGL.QOpenGLVersionProfile.profile()#
- Return type:
Returns the OpenGL profile. Only makes sense if profiles are supported by this version.
See also
- PySide6.QtOpenGL.QOpenGLVersionProfile.setProfile(profile)#
- Parameters:
profile –
OpenGLContextProfile
Sets the OpenGL profile profile
. Only makes sense if profiles are supported by this version.
See also
- PySide6.QtOpenGL.QOpenGLVersionProfile.setVersion(majorVersion, minorVersion)#
- Parameters:
majorVersion – int
minorVersion – int
Sets the major and minor version numbers to majorVersion
and minorVersion
respectively.
See also
- PySide6.QtOpenGL.QOpenGLVersionProfile.version()#
- Return type:
Returns a QPair<int,int> where the components represent the major and minor OpenGL version numbers respectively.
See also