pub struct Context { /* private fields */ }
Expand description

Contains the low-level OpenGL/WebGL graphics context as well as other “global” variables. Implements Deref with the low-level graphics context as target, so you can call low-level functionality directly on this struct. Use the context module to get access to low-level constants and structs.

Implementations

Creates a new mid-level context, used in this core module, from a low-level OpenGL/WebGL context from the context module. This should only be called directly if you are creating a low-level context yourself (ie. not using the features in the window module). Since the content in the context module is just a re-export of glow, you can also call this method with a reference counter to a glow context created using glow and not the re-export in context.

Compiles a Program with the given vertex and fragment shader source and stores it for later use. If it has already been created, then it is just returned.

Compiles an ImageEffect with the given fragment shader source and stores it for later use. If it has already been created, then it is just returned.

Returns a camera for viewing 2D content.

Creates a new headless graphics context (a graphics context that is not associated with any window).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The resulting type after dereferencing.

Dereferences the value.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

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

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more