QOpenGLVersionProfile露

The QOpenGLVersionProfile class represents the version and if applicable the profile of an OpenGL context. More鈥�

Inheritance diagram of PySide2.QtGui.QOpenGLVersionProfile

New in version 5.1.

Synopsis露

Functions露

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:

PySide2.QtGui.QSurfaceFormat

param other:

PySide2.QtGui.QOpenGLVersionProfile

Creates a default invalid QOpenGLVersionProfile object.

PySide2.QtGui.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.

See also

profile() version()

PySide2.QtGui.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.

PySide2.QtGui.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 .

PySide2.QtGui.QOpenGLVersionProfile.__ne__(rhs)露
Parameters:

rhs 鈥� PySide2.QtGui.QOpenGLVersionProfile

Return type:

bool

PySide2.QtGui.QOpenGLVersionProfile.__eq__(rhs)露
Parameters:

rhs 鈥� PySide2.QtGui.QOpenGLVersionProfile

Return type:

bool

PySide2.QtGui.QOpenGLVersionProfile.profile()露
Return type:

OpenGLContextProfile

Returns the OpenGL profile. Only makes sense if profiles are supported by this version.

See also

setProfile()

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

profile()

PySide2.QtGui.QOpenGLVersionProfile.setVersion(majorVersion, minorVersion)露
Parameters:
  • majorVersion 鈥� int

  • minorVersion 鈥� int

Sets the major and minor version numbers to majorVersion and minorVersion respectively.

See also

version()

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

setVersion()