Struct ggez::graphics::GlBackendSpec[][src]

pub struct GlBackendSpec { /* fields omitted */ }
Expand description

A backend specification for OpenGL. This is different from Backend because this needs to be its own struct to implement traits upon, and because there may need to be a layer of translation between what the user asks for in the config, and what the graphics backend code actually gets from the driver.

You shouldn’t normally need to fiddle with this directly but it has to be public because generic types like Shader depend on it.

Trait Implementations

gfx resource type

gfx factory type

gfx command buffer type

gfx device type

Returns the version of the backend, (major, minor). Read more

Returns the glutin Api enum for this backend.

Returns the text of the vertex and fragment shader files to create default shaders for this backend. Read more

Creates the window.

Returns a string containing some backend-dependent info.

Create an Encoder for the backend.

Resizes the viewport for the backend. (right now assumes a Glutin window…)

A helper function to take a RawShaderResourceView and turn it into a typed one based on the surface type defined in a BackendSpec. Read more

Helper function that turns a raw to typed texture. A bit hacky since we can’t really specify surface formats as part of this that well, alas. There’s some functions, like gfx::Encoder::update_texture(), that don’t seem to have a _raw() counterpart, so we need this, so we need BuggoSurfaceFormat to keep fixed at compile time what texture format we’re actually using. Oh well! Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Return GlBackendSpec { major: 3, minor: 2, api: glutin :: Api :: OpenGl }

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.