Struct gfx::device::handle::Manager [] [src]

pub struct Manager<R: Resources> {
    // some fields omitted
}

Stores reference-counted resources used in a command buffer. Seals actual resource names behind the interface, automatically referencing them both by the Factory on resource creation and the Renderer during CommandBuffer population.

Methods

impl<R: Resources> Manager<R>

fn new() -> Manager<R>

Create a new handle manager

fn clear(&mut self)

Clear all references

fn extend(&mut self, other: &Manager<R>)

Extend with all references of another handle manager

fn count(&self) -> usize

Count the total number of referenced resources

fn ref_buffer(&mut self, handle: &RawBuffer<R>) -> R

Reference a buffer

fn ref_array_buffer(&mut self, handle: &ArrayBuffer<R>) -> R

Reference am array buffer

fn ref_shader(&mut self, handle: &Shader<R>) -> R

Reference a shader

fn ref_program(&mut self, handle: &Program<R>) -> R

Reference a program

fn ref_frame_buffer(&mut self, handle: &FrameBuffer<R>) -> R

Reference a frame buffer

fn ref_surface(&mut self, handle: &Surface<R>) -> R

Reference a surface

fn ref_texture(&mut self, handle: &Texture<R>) -> R

Reference a texture

fn ref_sampler(&mut self, handle: &Sampler<R>) -> R

Reference a sampler

Trait Implementations

impl<R: Resources> Producer<R> for Manager<R>

fn make_buffer(&mut self, name: R, info: BufferInfo) -> RawBuffer<R>

fn make_array_buffer(&mut self, name: R) -> ArrayBuffer<R>

fn make_shader(&mut self, name: R, info: Stage) -> Shader<R>

fn make_program(&mut self, name: R, info: ProgramInfo) -> Program<R>

fn make_frame_buffer(&mut self, name: R) -> FrameBuffer<R>

fn make_surface(&mut self, name: R, info: SurfaceInfo) -> Surface<R>

fn make_texture(&mut self, name: R, info: TextureInfo) -> Texture<R>

fn make_sampler(&mut self, name: R, info: SamplerInfo) -> Sampler<R>

fn clean_with<T, F1: Fn(&mut T, &R), F2: Fn(&mut T, &R), F3: Fn(&mut T, &R), F4: Fn(&mut T, &R), F5: Fn(&mut T, &R), F6: Fn(&mut T, &R), F7: Fn(&mut T, &R), F8: Fn(&mut T, &R)>(&mut self, param: &mut T, f1: F1, f2: F2, f3: F3, f4: F4, f5: F5, f6: F6, f7: F7, f8: F8)