Trait bevy_retrograde::core::luminance::context::GraphicsContext[]

pub unsafe trait GraphicsContext {
    type Backend: ?Sized;
    fn backend(&mut self) -> &mut Self::Backend;

    fn new_pipeline_gate(&mut self) -> PipelineGate<'_, Self::Backend> { ... }
fn new_buffer<T>(
        &mut self,
        len: usize
    ) -> Result<Buffer<Self::Backend, T>, BufferError>
    where
        T: Copy + Default,
        Self::Backend: Buffer<T>
, { ... }
fn new_buffer_from_vec<T, X>(
        &mut self,
        vec: X
    ) -> Result<Buffer<Self::Backend, T>, BufferError>
    where
        T: Copy,
        X: Into<Vec<T, Global>>,
        Self::Backend: Buffer<T>
, { ... }
fn new_buffer_repeating<T>(
        &mut self,
        len: usize,
        value: T
    ) -> Result<Buffer<Self::Backend, T>, BufferError>
    where
        T: Copy,
        Self::Backend: Buffer<T>
, { ... }
fn new_framebuffer<D, CS, DS>(
        &mut self,
        size: <D as Dimensionable>::Size,
        mipmaps: usize,
        sampler: Sampler
    ) -> Result<Framebuffer<Self::Backend, D, CS, DS>, FramebufferError>
    where
        D: Dimensionable,
        CS: ColorSlot<Self::Backend, D>,
        DS: DepthSlot<Self::Backend, D>,
        Self::Backend: Framebuffer<D>
, { ... }
fn new_shader_stage<R>(
        &mut self,
        ty: StageType,
        src: R
    ) -> Result<Stage<Self::Backend>, StageError>
    where
        R: AsRef<str>,
        Self::Backend: Shader
, { ... }
fn new_shader_program<Sem, Out, Uni>(
        &mut self
    ) -> ProgramBuilder<'_, Self, Sem, Out, Uni>
    where
        Sem: Semantics,
        Self::Backend: Shader
, { ... }
fn new_tess(
        &mut self
    ) -> TessBuilder<'_, Self::Backend, (), (), (), Interleaved>
    where
        Self::Backend: Tess<(), (), (), Interleaved>
, { ... }
fn new_deinterleaved_tess<V, W>(
        &mut self
    ) -> TessBuilder<'_, Self::Backend, V, (), W, Deinterleaved>
    where
        V: TessVertexData<Deinterleaved>,
        W: TessVertexData<Deinterleaved>,
        Self::Backend: Tess<V, (), W, Deinterleaved>
, { ... }
fn new_texture<D, P>(
        &mut self,
        size: <D as Dimensionable>::Size,
        mipmaps: usize,
        sampler: Sampler
    ) -> Result<Texture<Self::Backend, D, P>, TextureError>
    where
        D: Dimensionable,
        P: Pixel,
        Self::Backend: Texture<D, P>
, { ... } }
Expand description

Class of graphics context.

Graphics context must implement this trait to be able to be used throughout the rest of the crate.

Associated Types

Internal type used by the backend to cache, optimize and store data. This roughly represents the GPU data / context a backend implementation needs to work correctly.

Required methods

Access the underlying backend.

Provided methods

Create a new pipeline gate

Create a new buffer.

See the documentation of Buffer::new for further details.

Create a new buffer from a slice.

See the documentation of Buffer::from_vec for further details.

Create a new buffer by repeating a value.

See the documentation of Buffer::repeat for further details.

Create a new framebuffer.

See the documentation of Framebuffer::new for further details.

Create a new shader stage.

See the documentation of Stage::new for further details.

Create a new shader program.

See the documentation of ProgramBuilder::new for further details.

Create a TessBuilder.

See the documentation of TessBuilder::new for further details.

Create a TessBuilder with deinterleaved memory.

See the documentation of TessBuilder::new for further details.

Create a new texture.

Feel free to have a look at the documentation of Texture::new for further details.

Implementations on Foreign Types

Implementors