Trait gfx::Device []

pub trait Device {
    type Resources: Resources;
    type CommandBuffer: CommandBuffer<Self::Resources>;
    fn get_capabilities(&self) -> &Capabilities;
    fn pin_submitted_resources(&mut self, &Manager<Self::Resources>);
    fn submit(&mut self, &mut Self::CommandBuffer);
    fn cleanup(&mut self);
}

A Device is responsible for submitting CommandBuffers to the GPU.

Associated Types

type Resources: Resources

Associated Resources type.

type CommandBuffer: CommandBuffer<Self::Resources>

Associated CommandBuffer type. Every Device type can only work with one CommandBuffer type.

Required Methods

fn get_capabilities(&self) -> &Capabilities

Returns the capabilities of this Ðevice.

fn pin_submitted_resources(&mut self, &Manager<Self::Resources>)

Pin everything from this handle manager to live for a frame.

fn submit(&mut self, &mut Self::CommandBuffer)

Submits a CommandBuffer to the GPU for execution.

fn cleanup(&mut self)

Cleanup unused resources. This should be called between frames.

Implementors