Struct gfx::handle::Manager
[−]
[src]
pub struct Manager<R> where
R: Resources, { /* 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> Manager<R> where
R: Resources,
[src]
R: Resources,
pub fn new() -> Manager<R>
[src]
Create a new handle manager
pub fn clear(&mut self)
[src]
Clear all references
pub fn extend(&mut self, other: &Manager<R>)
[src]
Extend with all references of another handle manager
pub fn count(&self) -> usize
[src]
Count the total number of referenced resources
pub fn ref_buffer(
&mut self,
handle: &'a RawBuffer<R>
) -> &'a <R as Resources>::Buffer
[src]
&mut self,
handle: &'a RawBuffer<R>
) -> &'a <R as Resources>::Buffer
Reference a buffer
pub fn ref_shader(
&mut self,
handle: &'a Shader<R>
) -> &'a <R as Resources>::Shader
[src]
&mut self,
handle: &'a Shader<R>
) -> &'a <R as Resources>::Shader
Reference a shader
pub fn ref_program(
&mut self,
handle: &'a Program<R>
) -> &'a <R as Resources>::Program
[src]
&mut self,
handle: &'a Program<R>
) -> &'a <R as Resources>::Program
Reference a program
pub fn ref_pso(
&mut self,
handle: &'a RawPipelineState<R>
) -> (&'a <R as Resources>::PipelineStateObject, &'a <R as Resources>::Program)
[src]
&mut self,
handle: &'a RawPipelineState<R>
) -> (&'a <R as Resources>::PipelineStateObject, &'a <R as Resources>::Program)
Reference a pipeline state object
pub fn ref_texture(
&mut self,
handle: &'a RawTexture<R>
) -> &'a <R as Resources>::Texture
[src]
&mut self,
handle: &'a RawTexture<R>
) -> &'a <R as Resources>::Texture
Reference a texture
pub fn ref_srv(
&mut self,
handle: &'a RawShaderResourceView<R>
) -> &'a <R as Resources>::ShaderResourceView
[src]
&mut self,
handle: &'a RawShaderResourceView<R>
) -> &'a <R as Resources>::ShaderResourceView
Reference a shader resource view
pub fn ref_uav(
&mut self,
handle: &'a RawUnorderedAccessView<R>
) -> &'a <R as Resources>::UnorderedAccessView
[src]
&mut self,
handle: &'a RawUnorderedAccessView<R>
) -> &'a <R as Resources>::UnorderedAccessView
Reference an unordered access view
pub fn ref_rtv(
&mut self,
handle: &'a RawRenderTargetView<R>
) -> &'a <R as Resources>::RenderTargetView
[src]
&mut self,
handle: &'a RawRenderTargetView<R>
) -> &'a <R as Resources>::RenderTargetView
Reference an RTV
pub fn ref_dsv(
&mut self,
handle: &'a RawDepthStencilView<R>
) -> &'a <R as Resources>::DepthStencilView
[src]
&mut self,
handle: &'a RawDepthStencilView<R>
) -> &'a <R as Resources>::DepthStencilView
Reference a DSV
pub fn ref_sampler(
&mut self,
handle: &'a Sampler<R>
) -> &'a <R as Resources>::Sampler
[src]
&mut self,
handle: &'a Sampler<R>
) -> &'a <R as Resources>::Sampler
Reference a sampler
pub fn ref_fence(&mut self, fence: &'a Fence<R>) -> &'a <R as Resources>::Fence
[src]
Reference a fence
Trait Implementations
impl<R> Producer<R> for Manager<R> where
R: Resources,
[src]
R: Resources,
fn make_buffer(
&mut self,
res: <R as Resources>::Buffer,
info: BufferInfo
) -> RawBuffer<R>
[src]
&mut self,
res: <R as Resources>::Buffer,
info: BufferInfo
) -> RawBuffer<R>
fn make_shader(&mut self, res: <R as Resources>::Shader) -> Shader<R>
[src]
fn make_program(
&mut self,
res: <R as Resources>::Program,
info: ProgramInfo
) -> Program<R>
[src]
&mut self,
res: <R as Resources>::Program,
info: ProgramInfo
) -> Program<R>
fn make_pso(
&mut self,
res: <R as Resources>::PipelineStateObject,
program: &Program<R>
) -> RawPipelineState<R>
[src]
&mut self,
res: <R as Resources>::PipelineStateObject,
program: &Program<R>
) -> RawPipelineState<R>
fn make_texture(
&mut self,
res: <R as Resources>::Texture,
desc: Descriptor
) -> RawTexture<R>
[src]
&mut self,
res: <R as Resources>::Texture,
desc: Descriptor
) -> RawTexture<R>
fn make_buffer_srv(
&mut self,
res: <R as Resources>::ShaderResourceView,
buf: &RawBuffer<R>
) -> RawShaderResourceView<R>
[src]
&mut self,
res: <R as Resources>::ShaderResourceView,
buf: &RawBuffer<R>
) -> RawShaderResourceView<R>
fn make_texture_srv(
&mut self,
res: <R as Resources>::ShaderResourceView,
tex: &RawTexture<R>
) -> RawShaderResourceView<R>
[src]
&mut self,
res: <R as Resources>::ShaderResourceView,
tex: &RawTexture<R>
) -> RawShaderResourceView<R>
fn make_buffer_uav(
&mut self,
res: <R as Resources>::UnorderedAccessView,
buf: &RawBuffer<R>
) -> RawUnorderedAccessView<R>
[src]
&mut self,
res: <R as Resources>::UnorderedAccessView,
buf: &RawBuffer<R>
) -> RawUnorderedAccessView<R>
fn make_texture_uav(
&mut self,
res: <R as Resources>::UnorderedAccessView,
tex: &RawTexture<R>
) -> RawUnorderedAccessView<R>
[src]
&mut self,
res: <R as Resources>::UnorderedAccessView,
tex: &RawTexture<R>
) -> RawUnorderedAccessView<R>
fn make_rtv(
&mut self,
res: <R as Resources>::RenderTargetView,
tex: &RawTexture<R>,
dim: (u16, u16, u16, AaMode)
) -> RawRenderTargetView<R>
[src]
&mut self,
res: <R as Resources>::RenderTargetView,
tex: &RawTexture<R>,
dim: (u16, u16, u16, AaMode)
) -> RawRenderTargetView<R>
fn make_dsv(
&mut self,
res: <R as Resources>::DepthStencilView,
tex: &RawTexture<R>,
dim: (u16, u16, u16, AaMode)
) -> RawDepthStencilView<R>
[src]
&mut self,
res: <R as Resources>::DepthStencilView,
tex: &RawTexture<R>,
dim: (u16, u16, u16, AaMode)
) -> RawDepthStencilView<R>
fn make_sampler(
&mut self,
res: <R as Resources>::Sampler,
info: SamplerInfo
) -> Sampler<R>
[src]
&mut self,
res: <R as Resources>::Sampler,
info: SamplerInfo
) -> Sampler<R>
fn make_fence(&mut self, res: <R as Resources>::Fence) -> Fence<R>
[src]
fn clean_with<T, A, B, C, D, E, F, G, H, I, J, K>(
&mut self,
param: &mut T,
fa: A,
fb: B,
fc: C,
fd: D,
fe: E,
ff: F,
fg: G,
fh: H,
fi: I,
fj: J,
fk: K
) where
A: Fn(&mut T, &<R as Resources>::Buffer),
B: Fn(&mut T, &<R as Resources>::Shader),
C: Fn(&mut T, &<R as Resources>::Program),
D: Fn(&mut T, &<R as Resources>::PipelineStateObject),
E: Fn(&mut T, &<R as Resources>::Texture),
F: Fn(&mut T, &<R as Resources>::ShaderResourceView),
G: Fn(&mut T, &<R as Resources>::UnorderedAccessView),
H: Fn(&mut T, &<R as Resources>::RenderTargetView),
I: Fn(&mut T, &<R as Resources>::DepthStencilView),
J: Fn(&mut T, &<R as Resources>::Sampler),
K: Fn(&mut T, &<R as Resources>::Fence),
[src]
&mut self,
param: &mut T,
fa: A,
fb: B,
fc: C,
fd: D,
fe: E,
ff: F,
fg: G,
fh: H,
fi: I,
fj: J,
fk: K
) where
A: Fn(&mut T, &<R as Resources>::Buffer),
B: Fn(&mut T, &<R as Resources>::Shader),
C: Fn(&mut T, &<R as Resources>::Program),
D: Fn(&mut T, &<R as Resources>::PipelineStateObject),
E: Fn(&mut T, &<R as Resources>::Texture),
F: Fn(&mut T, &<R as Resources>::ShaderResourceView),
G: Fn(&mut T, &<R as Resources>::UnorderedAccessView),
H: Fn(&mut T, &<R as Resources>::RenderTargetView),
I: Fn(&mut T, &<R as Resources>::DepthStencilView),
J: Fn(&mut T, &<R as Resources>::Sampler),
K: Fn(&mut T, &<R as Resources>::Fence),
Walk through all the handles, keep ones that are reference elsewhere and call the provided delete function (resource-specific) for others Read more