Struct draw2d::graphics::Graphics[][src]

pub struct Graphics {
    pub texture_atlas: GpuAtlas,
    pub clear_color: [f32; 4],
    pub device: Arc<Device>,
    // some fields omitted
}
Expand description

The application’s graphics subsystem.

Fields

texture_atlas: GpuAtlas

The graphics subsystem’s texture atlas.

clear_color: [f32; 4]

the color used to clear the screen

device: Arc<Device>

The vulkan device used by all resources in the graphics subsystem.

Implementations

Instantiate the graphics subsystem.

Add a new graphics layer to the top of the rendering stack.

This layer will be rendered above all other existing layers.

Add a new graphics layer to the bottom of the rendering stack.

This layer will be rendered below all other existing layers.

Return a mutable reference to the layer referenced by the handle

PANICs if the layer handle doesn’t refer to an actual layer.

Render a single frame to the screen.

Replace the swapchain and all dependent resources in the Triangle subsystem.

Trait Implementations

Block until the vulkan device idles.

Create a new sampler using the Graphics subsystem’s logical device.

Destroy a sampler. Read more

Create an empty 2d texture object using the Graphic subsystem’s logical device.

This implementation is generally SAFE because it forces the device to idle prior to removing the texture.

The atlas’s current version.

Build the array of descriptor image info objects which can be used to write all of this atlas’s textures into a descriptor set. Read more

Add a named sampler to the atlas. Samplers can be persistently bound to individual textures. Read more

Bind a sampler to a texture. Binding are persistent - they do not change until this method is called again. Read more

Add a texture to the atlas. The atlas owns the texture and will destroy it when the atlas is dropped. Read more

Read a file from the local filesystem into memory as a usable texture.

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

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

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.