[−][src]Struct qt_gui::QOpenGLVersionProfile
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.
Methods
impl QOpenGLVersionProfile
[src]
pub unsafe fn copy_from(
&mut self,
rhs: impl CastInto<Ref<QOpenGLVersionProfile>>
) -> MutRef<QOpenGLVersionProfile>
[src]
&mut self,
rhs: impl CastInto<Ref<QOpenGLVersionProfile>>
) -> MutRef<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.
pub unsafe fn has_profiles(&self) -> bool
[src]
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
.
pub unsafe fn is_legacy_version(&self) -> bool
[src]
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.
pub unsafe fn is_valid(&self) -> bool
[src]
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().
pub unsafe fn new_0a() -> CppBox<QOpenGLVersionProfile>
[src]
Creates a default invalid QOpenGLVersionProfile object.
Calls C++ function: [constructor] void QOpenGLVersionProfile::QOpenGLVersionProfile()
.
Creates a default invalid QOpenGLVersionProfile object.
pub unsafe fn new_1a(
format: impl CastInto<Ref<QSurfaceFormat>>
) -> CppBox<QOpenGLVersionProfile>
[src]
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.
pub unsafe fn new_copy(
other: impl CastInto<Ref<QOpenGLVersionProfile>>
) -> CppBox<QOpenGLVersionProfile>
[src]
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.
pub unsafe fn profile(&self) -> OpenGLContextProfile
[src]
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().
pub unsafe fn set_profile(&mut self, profile: OpenGLContextProfile)
[src]
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().
pub unsafe fn set_version(&mut self, major_version: c_int, minor_version: c_int)
[src]
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().
pub unsafe fn version(&self) -> CppBox<QPairOfIntInt>
[src]
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
impl CppDeletable for QOpenGLVersionProfile
[src]
unsafe fn delete(&mut self)
[src]
Destroys the QOpenGLVersionProfile object.
Calls C++ function: [destructor] void QOpenGLVersionProfile::~QOpenGLVersionProfile()
.
Destroys the QOpenGLVersionProfile object.
impl PartialEq<Ref<QOpenGLVersionProfile>> for QOpenGLVersionProfile
[src]
fn eq(&self, rhs: &Ref<QOpenGLVersionProfile>) -> bool
[src]
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().
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for QOpenGLVersionProfile
impl Send for QOpenGLVersionProfile
impl Sync for QOpenGLVersionProfile
impl Unpin for QOpenGLVersionProfile
impl UnwindSafe for QOpenGLVersionProfile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,