Struct kas_core::draw::SharedState

source ·
pub struct SharedState<DS: DrawSharedImpl> {
    pub draw: DS,
}
Expand description

Shared draw state

A single SharedState instance is shared by all windows and draw contexts. This struct is built over a [DrawSharedImpl] object provided by the shell, which may be accessed directly for a lower-level API (though most methods are available through SharedState directly).

Note: all functionality is implemented through the DrawShared trait to allow usage where the DS type parameter is unknown. Some functionality is also implemented directly to avoid the need for downcasting.

Fields§

§draw: DS

The shell’s [DrawSharedImpl] object

Trait Implementations§

Allocate an image Read more
Upload an image to the GPU Read more
Potentially free an image Read more
Get the size of an image

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
Cast from Self to T Read more
Try converting from Self to T Read more
Try approximate conversion from Self to T Read more
Cast approximately from Self to T Read more
Cast to integer, truncating Read more
Cast to the nearest integer Read more
Cast the floor to an integer Read more
Cast the ceiling to an integer Read more
Try converting to integer with truncation Read more
Try converting to the nearest integer Read more
Try converting the floor to an integer Read more
Try convert the ceiling to an integer 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 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.