QOpenGLVersionProfile — PyQt Documentation v6.9.0 (original) (raw)
PyQt6.QtOpenGL.QOpenGLVersionProfile
Description¶
The QOpenGLVersionProfile class represents the version and if applicable the profile of an OpenGL context.
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.
Methods¶
__init__()
Creates a default invalid QOpenGLVersionProfile object.
__init__(QSurfaceFormat)
Creates a QOpenGLVersionProfile object initialised with the version and profile from format.
__init__(QOpenGLVersionProfile)
Constructs a copy of other.
__eq__(QOpenGLVersionProfile) → bool
TODO
__hash__() → int
TODO
hasProfiles() → bool
Returns true
if profiles are supported by the OpenGL version returned by version(). Only OpenGL versions >= 3.2 support profiles.
See also
isLegacyVersion() → 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.
isValid() → bool
Returns true
if the version number is valid. Note that for a default constructed QOpenGLVersionProfile object this function will return false
.
See also
__ne__(QOpenGLVersionProfile) → bool
TODO
profile() → OpenGLContextProfile
Returns the OpenGL profile. Only makes sense if profiles are supported by this version.
setProfile(OpenGLContextProfile)
Sets the OpenGL profile profile. Only makes sense if profiles are supported by this version.
setVersion(int, int)
Sets the major and minor version numbers to majorVersion and minorVersion respectively.
version() → tuple[int, int]
Returns a std::pair<int,int> where the components represent the major and minor OpenGL version numbers respectively.