Struct qt_gui::QOpenGLVersionProfile
source · #[repr(C)]pub struct QOpenGLVersionProfile { /* private fields */ }
Expand description
The QOpenGLVersionProfile class represents the version and if applicable the profile of an OpenGL context.
C++ class: QOpenGLVersionProfile
.
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.
Implementations§
source§impl QOpenGLVersionProfile
impl QOpenGLVersionProfile
sourcepub unsafe fn copy_from(
&self,
rhs: impl CastInto<Ref<QOpenGLVersionProfile>>
) -> Ref<QOpenGLVersionProfile>
pub unsafe fn copy_from( &self, rhs: impl CastInto<Ref<QOpenGLVersionProfile>> ) -> Ref<QOpenGLVersionProfile>
Assigns the version and profile of rhs to this QOpenGLVersionProfile object.
Calls C++ function: QOpenGLVersionProfile& QOpenGLVersionProfile::operator=(const QOpenGLVersionProfile& rhs)
.
Assigns the version and profile of rhs to this QOpenGLVersionProfile object.
sourcepub unsafe fn has_profiles(&self) -> bool
pub unsafe fn has_profiles(&self) -> bool
Returns true
if profiles are supported by the OpenGL version returned by version(). Only OpenGL versions >= 3.2 support profiles.
Calls C++ function: bool QOpenGLVersionProfile::hasProfiles() const
.
sourcepub unsafe fn is_legacy_version(&self) -> bool
pub unsafe fn is_legacy_version(&self) -> 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.
Calls C++ function: bool QOpenGLVersionProfile::isLegacyVersion() const
.
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.
sourcepub unsafe fn is_valid(&self) -> bool
pub unsafe fn is_valid(&self) -> bool
Returns true
if the version number is valid. Note that for a default constructed QOpenGLVersionProfile object this function will return false
.
Calls C++ function: bool QOpenGLVersionProfile::isValid() const
.
Returns true
if the version number is valid. Note that for a default constructed QOpenGLVersionProfile object this function will return false
.
See also setVersion() and version().
sourcepub unsafe fn new_0a() -> CppBox<QOpenGLVersionProfile>
pub unsafe fn new_0a() -> CppBox<QOpenGLVersionProfile>
Creates a default invalid QOpenGLVersionProfile object.
Calls C++ function: [constructor] void QOpenGLVersionProfile::QOpenGLVersionProfile()
.
Creates a default invalid QOpenGLVersionProfile object.
sourcepub unsafe fn new_1a(
format: impl CastInto<Ref<QSurfaceFormat>>
) -> CppBox<QOpenGLVersionProfile>
pub unsafe fn new_1a( format: impl CastInto<Ref<QSurfaceFormat>> ) -> CppBox<QOpenGLVersionProfile>
Creates a QOpenGLVersionProfile object initialised with the version and profile from format.
Calls C++ function: [constructor] void QOpenGLVersionProfile::QOpenGLVersionProfile(const QSurfaceFormat& format)
.
Creates a QOpenGLVersionProfile object initialised with the version and profile from format.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QOpenGLVersionProfile>>
) -> CppBox<QOpenGLVersionProfile>
pub unsafe fn new_copy( other: impl CastInto<Ref<QOpenGLVersionProfile>> ) -> CppBox<QOpenGLVersionProfile>
Constructs a copy of other.
Calls C++ function: [constructor] void QOpenGLVersionProfile::QOpenGLVersionProfile(const QOpenGLVersionProfile& other)
.
Constructs a copy of other.
sourcepub unsafe fn profile(&self) -> OpenGLContextProfile
pub unsafe fn profile(&self) -> OpenGLContextProfile
Returns the OpenGL profile. Only makes sense if profiles are supported by this version.
Calls C++ function: QSurfaceFormat::OpenGLContextProfile QOpenGLVersionProfile::profile() const
.
Returns the OpenGL profile. Only makes sense if profiles are supported by this version.
See also setProfile().
sourcepub unsafe fn set_profile(&self, profile: OpenGLContextProfile)
pub unsafe fn set_profile(&self, profile: OpenGLContextProfile)
Sets the OpenGL profile profile. Only makes sense if profiles are supported by this version.
Calls C++ function: void QOpenGLVersionProfile::setProfile(QSurfaceFormat::OpenGLContextProfile profile)
.
Sets the OpenGL profile profile. Only makes sense if profiles are supported by this version.
See also profile().
sourcepub unsafe fn set_version(&self, major_version: c_int, minor_version: c_int)
pub unsafe fn set_version(&self, major_version: c_int, minor_version: c_int)
Sets the major and minor version numbers to majorVersion and minorVersion respectively.
Calls C++ function: void QOpenGLVersionProfile::setVersion(int majorVersion, int minorVersion)
.
Sets the major and minor version numbers to majorVersion and minorVersion respectively.
See also version().
sourcepub unsafe fn version(&self) -> CppBox<QPairOfIntInt>
pub unsafe fn version(&self) -> CppBox<QPairOfIntInt>
Returns a QPair<int,int> where the components represent the major and minor OpenGL version numbers respectively.
Calls C++ function: QPair<int, int> QOpenGLVersionProfile::version() const
.
Returns a QPair<int,int> where the components represent the major and minor OpenGL version numbers respectively.
See also setVersion().
Trait Implementations§
source§impl CppDeletable for QOpenGLVersionProfile
impl CppDeletable for QOpenGLVersionProfile
source§unsafe fn delete(&self)
unsafe fn delete(&self)
Destroys the QOpenGLVersionProfile object.
Calls C++ function: [destructor] void QOpenGLVersionProfile::~QOpenGLVersionProfile()
.
Destroys the QOpenGLVersionProfile object.
source§impl PartialEq<Ref<QOpenGLVersionProfile>> for QOpenGLVersionProfile
impl PartialEq<Ref<QOpenGLVersionProfile>> for QOpenGLVersionProfile
source§fn eq(&self, rhs: &Ref<QOpenGLVersionProfile>) -> bool
fn eq(&self, rhs: &Ref<QOpenGLVersionProfile>) -> bool
Returns true
if page layout lhs is equal to page layout rhs, i.e. if all the attributes are exactly equal.
Calls C++ function: bool operator==(const QOpenGLVersionProfile& lhs, const QOpenGLVersionProfile& rhs)
.
Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator==(const QPageLayout &lhs, const QPageLayout &rhs)
:
Returns true
if page layout lhs is equal to page layout rhs, i.e. if all the attributes are exactly equal.
Note that this is a strict equality, especially for page size where the QPageSize ID, name and size must exactly match, and the margins where the units must match.
See also QPageLayout::isEquivalentTo().