Struct gfx_device_gl::Factory
[−]
[src]
pub struct Factory { /* fields omitted */ }GL resource factory.
Methods
impl Factory[src]
pub fn new(share: Rc<Share>) -> Factory[src]
Create a new Factory.
pub fn create_command_buffer(&mut self) -> CommandBuffer[src]
Trait Implementations
impl Clone for Factory[src]
fn clone(&self) -> Factory[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Factory<R> for Factory[src]
type Mapper = RawMapping
Associated mapper type
fn get_capabilities(&self) -> &Capabilities[src]
Returns the capabilities of this Factory. This usually depends on the graphics API being used. Read more
fn create_buffer_raw(
&mut self,
info: BufferInfo
) -> Result<RawBuffer<R>, BufferError>[src]
&mut self,
info: BufferInfo
) -> Result<RawBuffer<R>, BufferError>
fn create_buffer_const_raw(
&mut self,
data: &[u8],
stride: usize,
role: BufferRole,
bind: Bind
) -> Result<RawBuffer<R>, BufferError>[src]
&mut self,
data: &[u8],
stride: usize,
role: BufferRole,
bind: Bind
) -> Result<RawBuffer<R>, BufferError>
fn create_shader(
&mut self,
stage: Stage,
code: &[u8]
) -> Result<Shader<R>, CreateShaderError>[src]
&mut self,
stage: Stage,
code: &[u8]
) -> Result<Shader<R>, CreateShaderError>
Compiles a shader source into a Shader object that can be used to create a shader Program. Read more
fn create_program(
&mut self,
shader_set: &ShaderSet<R>
) -> Result<Program<R>, CreateProgramError>[src]
&mut self,
shader_set: &ShaderSet<R>
) -> Result<Program<R>, CreateProgramError>
Creates a new shader Program for the supplied ShaderSet.
fn create_pipeline_state_raw(
&mut self,
program: &Program<R>,
desc: &Descriptor
) -> Result<RawPipelineState<R>, CreationError>[src]
&mut self,
program: &Program<R>,
desc: &Descriptor
) -> Result<RawPipelineState<R>, CreationError>
Creates a new RawPipelineState. To create a safely typed PipelineState, see the FactoryExt trait and pso module, both in the gfx crate. Read more
fn create_texture_raw(
&mut self,
desc: Descriptor,
hint: Option<ChannelType>,
data_opt: Option<&[&[u8]]>
) -> Result<RawTexture<R>, Error>[src]
&mut self,
desc: Descriptor,
hint: Option<ChannelType>,
data_opt: Option<&[&[u8]]>
) -> Result<RawTexture<R>, Error>
Create a new empty raw texture with no data. The channel type parameter is a hint, required to assist backends that have no concept of typeless formats (OpenGL). The initial data, if given, has to be provided for all mip levels and slices: Slice0.Mip0, Slice0.Mip1, ..., Slice1.Mip0, ... Read more
fn view_buffer_as_shader_resource_raw(
&mut self,
hbuf: &RawBuffer<R>
) -> Result<RawShaderResourceView<R>, ResourceViewError>[src]
&mut self,
hbuf: &RawBuffer<R>
) -> Result<RawShaderResourceView<R>, ResourceViewError>
fn view_buffer_as_unordered_access_raw(
&mut self,
_hbuf: &RawBuffer<R>
) -> Result<RawUnorderedAccessView<R>, ResourceViewError>[src]
&mut self,
_hbuf: &RawBuffer<R>
) -> Result<RawUnorderedAccessView<R>, ResourceViewError>
fn view_texture_as_shader_resource_raw(
&mut self,
htex: &RawTexture<R>,
_desc: ResourceDesc
) -> Result<RawShaderResourceView<R>, ResourceViewError>[src]
&mut self,
htex: &RawTexture<R>,
_desc: ResourceDesc
) -> Result<RawShaderResourceView<R>, ResourceViewError>
fn view_texture_as_unordered_access_raw(
&mut self,
_htex: &RawTexture<R>
) -> Result<RawUnorderedAccessView<R>, ResourceViewError>[src]
&mut self,
_htex: &RawTexture<R>
) -> Result<RawUnorderedAccessView<R>, ResourceViewError>
fn view_texture_as_render_target_raw(
&mut self,
htex: &RawTexture<R>,
desc: RenderDesc
) -> Result<RawRenderTargetView<R>, TargetViewError>[src]
&mut self,
htex: &RawTexture<R>,
desc: RenderDesc
) -> Result<RawRenderTargetView<R>, TargetViewError>
fn view_texture_as_depth_stencil_raw(
&mut self,
htex: &RawTexture<R>,
desc: DepthStencilDesc
) -> Result<RawDepthStencilView<R>, TargetViewError>[src]
&mut self,
htex: &RawTexture<R>,
desc: DepthStencilDesc
) -> Result<RawDepthStencilView<R>, TargetViewError>
fn create_sampler(&mut self, info: SamplerInfo) -> Sampler<R>[src]
fn map_buffer_raw(
&mut self,
buf: &RawBuffer<R>,
access: MapAccess
) -> RawMapping[src]
&mut self,
buf: &RawBuffer<R>,
access: MapAccess
) -> RawMapping
fn unmap_buffer_raw(&mut self, map: RawMapping)[src]
fn map_buffer_readable<T: Copy>(
&mut self,
buf: &Buffer<R, T>
) -> Readable<T, R, Factory>[src]
&mut self,
buf: &Buffer<R, T>
) -> Readable<T, R, Factory>
fn map_buffer_writable<T: Copy>(
&mut self,
buf: &Buffer<R, T>
) -> Writable<T, R, Factory>[src]
&mut self,
buf: &Buffer<R, T>
) -> Writable<T, R, Factory>
fn map_buffer_rw<T: Copy>(&mut self, buf: &Buffer<R, T>) -> RW<T, R, Factory>[src]
fn create_buffer_const<T>(
&mut self,
data: &[T],
role: BufferRole,
bind: Bind
) -> Result<Buffer<R, T>, BufferError> where
T: Copy, [src]
&mut self,
data: &[T],
role: BufferRole,
bind: Bind
) -> Result<Buffer<R, T>, BufferError> where
T: Copy,
fn create_buffer_dynamic<T>(
&mut self,
num: usize,
role: BufferRole,
bind: Bind
) -> Result<Buffer<R, T>, BufferError>[src]
&mut self,
num: usize,
role: BufferRole,
bind: Bind
) -> Result<Buffer<R, T>, BufferError>
fn create_buffer_staging<T>(
&mut self,
num: usize,
role: BufferRole,
bind: Bind,
map: MapAccess
) -> Result<Buffer<R, T>, BufferError>[src]
&mut self,
num: usize,
role: BufferRole,
bind: Bind,
map: MapAccess
) -> Result<Buffer<R, T>, BufferError>
fn create_shader_vertex(
&mut self,
code: &[u8]
) -> Result<VertexShader<R>, CreateShaderError>[src]
&mut self,
code: &[u8]
) -> Result<VertexShader<R>, CreateShaderError>
Compiles a VertexShader from source.
fn create_shader_geometry(
&mut self,
code: &[u8]
) -> Result<GeometryShader<R>, CreateShaderError>[src]
&mut self,
code: &[u8]
) -> Result<GeometryShader<R>, CreateShaderError>
Compiles a GeometryShader from source.
fn create_shader_pixel(
&mut self,
code: &[u8]
) -> Result<PixelShader<R>, CreateShaderError>[src]
&mut self,
code: &[u8]
) -> Result<PixelShader<R>, CreateShaderError>
Compiles a PixelShader from source. This is the same as what some APIs call a fragment shader. Read more
fn create_texture<S>(
&mut self,
kind: Kind,
levels: u8,
bind: Bind,
usage: Usage,
channel_hint: Option<ChannelType>
) -> Result<Texture<R, S>, Error> where
S: SurfaceTyped, [src]
&mut self,
kind: Kind,
levels: u8,
bind: Bind,
usage: Usage,
channel_hint: Option<ChannelType>
) -> Result<Texture<R, S>, Error> where
S: SurfaceTyped,
fn view_buffer_as_shader_resource<T>(
&mut self,
buf: &Buffer<R, T>
) -> Result<ShaderResourceView<R, T>, ResourceViewError>[src]
&mut self,
buf: &Buffer<R, T>
) -> Result<ShaderResourceView<R, T>, ResourceViewError>
fn view_buffer_as_unordered_access<T>(
&mut self,
buf: &Buffer<R, T>
) -> Result<UnorderedAccessView<R, T>, ResourceViewError>[src]
&mut self,
buf: &Buffer<R, T>
) -> Result<UnorderedAccessView<R, T>, ResourceViewError>
fn view_texture_as_shader_resource<T>(
&mut self,
tex: &Texture<R, <T as Formatted>::Surface>,
levels: (u8, u8),
swizzle: Swizzle
) -> Result<ShaderResourceView<R, <T as Formatted>::View>, ResourceViewError> where
T: TextureFormat, [src]
&mut self,
tex: &Texture<R, <T as Formatted>::Surface>,
levels: (u8, u8),
swizzle: Swizzle
) -> Result<ShaderResourceView<R, <T as Formatted>::View>, ResourceViewError> where
T: TextureFormat,
fn view_texture_as_unordered_access<T>(
&mut self,
tex: &Texture<R, <T as Formatted>::Surface>
) -> Result<UnorderedAccessView<R, <T as Formatted>::View>, ResourceViewError> where
T: TextureFormat, [src]
&mut self,
tex: &Texture<R, <T as Formatted>::Surface>
) -> Result<UnorderedAccessView<R, <T as Formatted>::View>, ResourceViewError> where
T: TextureFormat,
fn view_texture_as_render_target<T>(
&mut self,
tex: &Texture<R, <T as Formatted>::Surface>,
level: u8,
layer: Option<u16>
) -> Result<RenderTargetView<R, T>, TargetViewError> where
T: RenderFormat, [src]
&mut self,
tex: &Texture<R, <T as Formatted>::Surface>,
level: u8,
layer: Option<u16>
) -> Result<RenderTargetView<R, T>, TargetViewError> where
T: RenderFormat,
fn view_texture_as_depth_stencil<T>(
&mut self,
tex: &Texture<R, <T as Formatted>::Surface>,
level: u8,
layer: Option<u16>,
flags: DepthStencilFlags
) -> Result<DepthStencilView<R, T>, TargetViewError> where
T: DepthFormat, [src]
&mut self,
tex: &Texture<R, <T as Formatted>::Surface>,
level: u8,
layer: Option<u16>,
flags: DepthStencilFlags
) -> Result<DepthStencilView<R, T>, TargetViewError> where
T: DepthFormat,
fn view_texture_as_depth_stencil_trivial<T>(
&mut self,
tex: &Texture<R, <T as Formatted>::Surface>
) -> Result<DepthStencilView<R, T>, TargetViewError> where
T: DepthFormat, [src]
&mut self,
tex: &Texture<R, <T as Formatted>::Surface>
) -> Result<DepthStencilView<R, T>, TargetViewError> where
T: DepthFormat,
fn create_texture_const_u8<T>(
&mut self,
kind: Kind,
data: &[&[u8]]
) -> Result<(Texture<R, <T as Formatted>::Surface>, ShaderResourceView<R, <T as Formatted>::View>), CombinedError> where
T: TextureFormat, [src]
&mut self,
kind: Kind,
data: &[&[u8]]
) -> Result<(Texture<R, <T as Formatted>::Surface>, ShaderResourceView<R, <T as Formatted>::View>), CombinedError> where
T: TextureFormat,
fn create_texture_const<T>(
&mut self,
kind: Kind,
data: &[&[<<T as Formatted>::Surface as SurfaceTyped>::DataType]]
) -> Result<(Texture<R, <T as Formatted>::Surface>, ShaderResourceView<R, <T as Formatted>::View>), CombinedError> where
T: TextureFormat, [src]
&mut self,
kind: Kind,
data: &[&[<<T as Formatted>::Surface as SurfaceTyped>::DataType]]
) -> Result<(Texture<R, <T as Formatted>::Surface>, ShaderResourceView<R, <T as Formatted>::View>), CombinedError> where
T: TextureFormat,
fn create_render_target<T>(
&mut self,
width: u16,
height: u16
) -> Result<(Texture<R, <T as Formatted>::Surface>, ShaderResourceView<R, <T as Formatted>::View>, RenderTargetView<R, T>), CombinedError> where
T: TextureFormat + RenderFormat, [src]
&mut self,
width: u16,
height: u16
) -> Result<(Texture<R, <T as Formatted>::Surface>, ShaderResourceView<R, <T as Formatted>::View>, RenderTargetView<R, T>), CombinedError> where
T: TextureFormat + RenderFormat,
fn create_depth_stencil<T>(
&mut self,
width: u16,
height: u16
) -> Result<(Texture<R, <T as Formatted>::Surface>, ShaderResourceView<R, <T as Formatted>::View>, DepthStencilView<R, T>), CombinedError> where
T: DepthFormat + TextureFormat, [src]
&mut self,
width: u16,
height: u16
) -> Result<(Texture<R, <T as Formatted>::Surface>, ShaderResourceView<R, <T as Formatted>::View>, DepthStencilView<R, T>), CombinedError> where
T: DepthFormat + TextureFormat,
fn create_depth_stencil_view_only<T>(
&mut self,
width: u16,
height: u16
) -> Result<DepthStencilView<R, T>, CombinedError> where
T: DepthFormat + TextureFormat, [src]
&mut self,
width: u16,
height: u16
) -> Result<DepthStencilView<R, T>, CombinedError> where
T: DepthFormat + TextureFormat,