[][src]Struct qt_gui::QOpenGLVersionProfile

#[repr(C)]pub struct QOpenGLVersionProfile { /* fields omitted */ }

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.

Methods

impl QOpenGLVersionProfile[src]

pub unsafe fn copy_from(
    &self,
    rhs: impl CastInto<Ref<QOpenGLVersionProfile>>
) -> Ref<QOpenGLVersionProfile>
[src]

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.

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.

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

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.

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.

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.

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

pub unsafe fn new_0a() -> CppBox<QOpenGLVersionProfile>[src]

Creates a default invalid QOpenGLVersionProfile object.

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

C++ documentation:

Creates a default invalid QOpenGLVersionProfile object.

pub unsafe fn new_1a(
    format: impl CastInto<Ref<QSurfaceFormat>>
) -> CppBox<QOpenGLVersionProfile>
[src]

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.

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QOpenGLVersionProfile>>
) -> CppBox<QOpenGLVersionProfile>
[src]

Constructs a copy of other.

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

C++ documentation:

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.

C++ documentation:

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

See also setProfile().

pub unsafe fn set_profile(&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).

C++ documentation:

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

See also profile().

pub unsafe fn set_version(&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).

C++ documentation:

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.

C++ documentation:

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(&self)[src]

Destroys the QOpenGLVersionProfile object.

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

C++ documentation:

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

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.