QOpenGLVersionProfile¶
The
QOpenGLVersionProfile
class represents the version and if applicable the profile of an OpenGL context. More…
New in version 5.1.
Synopsis¶
Functions¶
def
__eq__
(, rhs)def
__ne__
(, rhs)def
hasProfiles
()def
isLegacyVersion
()def
isValid
()def
profile
()def
setProfile
(profile)def
setVersion
(majorVersion, minorVersion)def
version
()
Detailed Description¶
An object of this class can be passed to
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 PySide2.QtGui.QOpenGLVersionProfile¶
PySide2.QtGui.QOpenGLVersionProfile(other)
PySide2.QtGui.QOpenGLVersionProfile(format)
- param format:
- param other:
Creates a default invalid
QOpenGLVersionProfile
object.
- PySide2.QtGui.QOpenGLVersionProfile.hasProfiles()¶
- Return type:
bool
Returns
true
if profiles are supported by the OpenGL version returned byversion()
. Only OpenGL versions >= 3.2 support profiles.
- PySide2.QtGui.QOpenGLVersionProfile.isLegacyVersion()¶
- Return type:
bool
Returns
true
is the OpenGL version returned byversion()
contains deprecated functions and does not support profiles i.e. if the OpenGL version is <= 3.1.
- PySide2.QtGui.QOpenGLVersionProfile.isValid()¶
- Return type:
bool
Returns
true
if the version number is valid. Note that for a default constructedQOpenGLVersionProfile
object this function will returnfalse
.See also
- PySide2.QtGui.QOpenGLVersionProfile.__ne__(rhs)¶
- Parameters:
- Return type:
bool
- PySide2.QtGui.QOpenGLVersionProfile.__eq__(rhs)¶
- Parameters:
- Return type:
bool
- PySide2.QtGui.QOpenGLVersionProfile.profile()¶
- Return type:
Returns the OpenGL profile. Only makes sense if profiles are supported by this version.
See also
- PySide2.QtGui.QOpenGLVersionProfile.setProfile(profile)¶
- Parameters:
profile –
OpenGLContextProfile
Sets the OpenGL profile
profile
. Only makes sense if profiles are supported by this version.See also
- PySide2.QtGui.QOpenGLVersionProfile.setVersion(majorVersion, minorVersion)¶
- Parameters:
majorVersion – int
minorVersion – int
Sets the major and minor version numbers to
majorVersion
andminorVersion
respectively.See also
- PySide2.QtGui.QOpenGLVersionProfile.version()¶
- Return type:
Returns a
QPair
<int,int> where the components represent the major and minor OpenGL version numbers respectively.See also
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.