QOpenGLVersionProfileclass represents the version and if applicable the profile of an OpenGL context. 更多 …
New in version 5.1.
def
__eq__
(, rhs)
def
__ne__
(, rhs)
def
hasProfiles
()
def
isLegacyVersion
()
def
isValid
()
def
profile
()
def
setProfile
(profile)
def
setVersion
(majorVersion, minorVersion)
def
version
()
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.
QOpenGLVersionProfile
¶
QOpenGLVersionProfile(other)
QOpenGLVersionProfile(format)
- param format
- param other
Creates a default invalid
QOpenGLVersionProfile
对象。
PySide2.QtGui.QOpenGLVersionProfile.
hasProfiles
(
)
¶
bool
返回
true
if profiles are supported by the OpenGL version returned by
version()
. Only OpenGL versions >= 3.2 support profiles.
PySide2.QtGui.QOpenGLVersionProfile.
isLegacyVersion
(
)
¶
bool
返回
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.
PySide2.QtGui.QOpenGLVersionProfile.
isValid
(
)
¶
bool
返回
true
if the version number is valid. Note that for a default constructed
QOpenGLVersionProfile
object this function will return
false
.
另请参阅
PySide2.QtGui.QOpenGLVersionProfile.
__ne__
(
rhs
)
¶
rhs
–
QOpenGLVersionProfile
bool
PySide2.QtGui.QOpenGLVersionProfile.
__eq__
(
rhs
)
¶
rhs
–
QOpenGLVersionProfile
bool
PySide2.QtGui.QOpenGLVersionProfile.
profile
(
)
¶
OpenGLContextProfile
Returns the OpenGL profile. Only makes sense if profiles are supported by this version.
另请参阅
PySide2.QtGui.QOpenGLVersionProfile.
setProfile
(
profile
)
¶
profile
–
OpenGLContextProfile
Sets the OpenGL profile
profile
. Only makes sense if profiles are supported by this version.
另请参阅
PySide2.QtGui.QOpenGLVersionProfile.
setVersion
(
majorVersion
,
minorVersion
)
¶
majorVersion
–
int
minorVersion
–
int
Sets the major and minor version numbers to
majorVersion
and
minorVersion
分别。
另请参阅
PySide2.QtGui.QOpenGLVersionProfile.
version
(
)
¶
返回
QPair
<int,int> where the components represent the major and minor OpenGL version numbers respectively.
另请参阅