Enum rg3d::GlRequest[][src]

pub enum GlRequest {
    Latest,
    Specific(Api(u8, u8)),
    GlThenGles {
        opengl_version: (u8, u8),
        opengles_version: (u8, u8),
    },
}

Describes the OpenGL API and version that are being requested when a context is created.

Variants

Latest

Request the latest version of the “best” API of this platform.

On desktop, will try OpenGL.

Specific(Api(u8, u8))

Request a specific version of a specific API.

Example: GlRequest::Specific(Api::OpenGl, (3, 3)).

GlThenGles

If OpenGL is available, create an OpenGL Context with the specified opengl_version. Else if OpenGL ES or WebGL is available, create a context with the specified opengles_version.

Fields of GlThenGles

opengl_version: (u8, u8)

The version to use for OpenGL.

opengles_version: (u8, u8)

The version to use for OpenGL ES.

Implementations

impl GlRequest[src]

pub fn to_gl_version(&self) -> Option<(u8, u8)>[src]

Extract the desktop GL version, if any.

Trait Implementations

impl Clone for GlRequest[src]

impl Copy for GlRequest[src]

impl Debug for GlRequest[src]

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ResourceLoadError for T where
    T: 'static + Debug + Send + Sync
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,