#[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.

C++ documentation:

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

source

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).

C++ documentation:

Assigns the version and profile of rhs to this QOpenGLVersionProfile object.

source

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.

C++ documentation:

Returns true if profiles are supported by the OpenGL version returned by version(). Only OpenGL versions >= 3.2 support profiles.

See also profile() and version().

source

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.

C++ documentation:

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.

source

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.

C++ documentation:

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().

source

pub unsafe fn new_0a() -> CppBox<QOpenGLVersionProfile>

Creates a default invalid QOpenGLVersionProfile object.

Calls C++ function: [constructor] void QOpenGLVersionProfile::QOpenGLVersionProfile().

C++ documentation:

Creates a default invalid QOpenGLVersionProfile object.

source

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).

C++ documentation:

Creates a QOpenGLVersionProfile object initialised with the version and profile from format.

source

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).

C++ documentation:

Constructs a copy of other.

source

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.

C++ documentation:

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

See also setProfile().

source

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).

C++ documentation:

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

See also profile().

source

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).

C++ documentation:

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

See also version().

source

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.

C++ documentation:

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

source§

unsafe fn delete(&self)

Destroys the QOpenGLVersionProfile object.

Calls C++ function: [destructor] void QOpenGLVersionProfile::~QOpenGLVersionProfile().

C++ documentation:

Destroys the QOpenGLVersionProfile object.

source§

impl PartialEq<Ref<QOpenGLVersionProfile>> for QOpenGLVersionProfile

source§

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().

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.