[][src]Struct gfx_device_gl::Factory

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_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Factory<Resources> for Factory[src]

fn create_buffer_immutable<T>(
    &mut self,
    data: &[T],
    role: Role,
    bind: Bind
) -> Result<Buffer<R, T>, CreationError> where
    T: Pod
[src]

fn create_buffer<T>(
    &mut self,
    num: usize,
    role: Role,
    usage: Usage,
    bind: Bind
) -> Result<Buffer<R, T>, CreationError>
[src]

fn create_shader_vertex(
    &mut self,
    code: &[u8]
) -> Result<VertexShader<R>, CreateShaderError>
[src]

Compiles a VertexShader from source.

fn create_shader_hull(
    &mut self,
    code: &[u8]
) -> Result<HullShader<R>, CreateShaderError>
[src]

Compiles a HullShader from source.

fn create_shader_domain(
    &mut self,
    code: &[u8]
) -> Result<DomainShader<R>, CreateShaderError>
[src]

Compiles a VertexShader from source.

fn create_shader_geometry(
    &mut self,
    code: &[u8]
) -> Result<GeometryShader<R>, CreateShaderError>
[src]

Compiles a GeometryShader from source.

fn create_shader_pixel(
    &mut self,
    code: &[u8]
) -> Result<PixelShader<R>, CreateShaderError>
[src]

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>, CreationError> where
    S: SurfaceTyped
[src]

fn view_buffer_as_shader_resource<T>(
    &mut self,
    buf: &Buffer<R, T>
) -> Result<ShaderResourceView<R, T>, ResourceViewError> where
    T: Formatted
[src]

fn view_buffer_as_unordered_access<T>(
    &mut self,
    buf: &Buffer<R, T>
) -> Result<UnorderedAccessView<R, T>, ResourceViewError>
[src]

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]

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]

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]

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]

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]

fn create_texture_immutable_u8<T>(
    &mut self,
    kind: Kind,
    mipmap: Mipmap,
    data: &[&[u8]]
) -> Result<(Texture<R, <T as Formatted>::Surface>, ShaderResourceView<R, <T as Formatted>::View>), CombinedError> where
    T: TextureFormat
[src]

fn create_texture_immutable<T>(
    &mut self,
    kind: Kind,
    mipmap: Mipmap,
    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]

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]

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]

fn create_depth_stencil_view_only<T>(
    &mut self,
    width: u16,
    height: u16
) -> Result<DepthStencilView<R, T>, CombinedError> where
    T: DepthFormat + TextureFormat
[src]

Auto Trait Implementations

impl !Send for Factory

impl Unpin for Factory

impl !Sync for Factory

impl !UnwindSafe for Factory

impl !RefUnwindSafe for Factory

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]