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

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

Fields

opengl_version: (u8, u8)

The version to use for OpenGL.

opengles_version: (u8, u8)

The version to use for OpenGL ES.

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.

Implementations

Extract the desktop GL version, if any.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.