[−][src]Trait luminance::context::GraphicsContext
Class of graphics context.
Graphics context must implement this trait to be able to be used throughout the rest of the crate.
Associated Types
type Backend: ?Sized
[src]
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
Loading content...Provided methods
pub fn new_pipeline_gate(&mut self) -> PipelineGate<'_, Self::Backend>
[src]
Create a new pipeline gate
pub fn new_buffer<T>(
&mut self,
len: usize
) -> Result<Buffer<Self::Backend, T>, BufferError> where
Self::Backend: BufferBackend<T>,
T: Copy + Default,
[src]
&mut self,
len: usize
) -> Result<Buffer<Self::Backend, T>, BufferError> where
Self::Backend: BufferBackend<T>,
T: Copy + Default,
Create a new buffer.
See the documentation of Buffer::new
for further details.
pub fn new_buffer_from_vec<T, X>(
&mut self,
vec: X
) -> Result<Buffer<Self::Backend, T>, BufferError> where
Self::Backend: BufferBackend<T>,
X: Into<Vec<T>>,
T: Copy,
[src]
&mut self,
vec: X
) -> Result<Buffer<Self::Backend, T>, BufferError> where
Self::Backend: BufferBackend<T>,
X: Into<Vec<T>>,
T: Copy,
Create a new buffer from a slice.
See the documentation of Buffer::from_vec
for further details.
pub fn new_buffer_repeating<T>(
&mut self,
len: usize,
value: T
) -> Result<Buffer<Self::Backend, T>, BufferError> where
Self::Backend: BufferBackend<T>,
T: Copy,
[src]
&mut self,
len: usize,
value: T
) -> Result<Buffer<Self::Backend, T>, BufferError> where
Self::Backend: BufferBackend<T>,
T: Copy,
Create a new buffer by repeating a value.
See the documentation of Buffer::repeat
for further details.
pub fn new_framebuffer<D, CS, DS>(
&mut self,
size: D::Size,
mipmaps: usize,
sampler: Sampler
) -> Result<Framebuffer<Self::Backend, D, CS, DS>, FramebufferError> where
Self::Backend: FramebufferBackend<D>,
D: Dimensionable,
CS: ColorSlot<Self::Backend, D>,
DS: DepthSlot<Self::Backend, D>,
[src]
&mut self,
size: D::Size,
mipmaps: usize,
sampler: Sampler
) -> Result<Framebuffer<Self::Backend, D, CS, DS>, FramebufferError> where
Self::Backend: FramebufferBackend<D>,
D: Dimensionable,
CS: ColorSlot<Self::Backend, D>,
DS: DepthSlot<Self::Backend, D>,
Create a new framebuffer.
See the documentation of Framebuffer::new
for further details.
pub fn new_shader_stage<R>(
&mut self,
ty: StageType,
src: R
) -> Result<Stage<Self::Backend>, StageError> where
Self::Backend: Shader,
R: AsRef<str>,
[src]
&mut self,
ty: StageType,
src: R
) -> Result<Stage<Self::Backend>, StageError> where
Self::Backend: Shader,
R: AsRef<str>,
Create a new shader stage.
See the documentation of Stage::new
for further details.
pub fn new_shader_program<Sem, Out, Uni>(
&mut self
) -> ProgramBuilder<'_, Self, Sem, Out, Uni> where
Self::Backend: Shader,
Sem: Semantics,
[src]
&mut self
) -> ProgramBuilder<'_, Self, Sem, Out, Uni> where
Self::Backend: Shader,
Sem: Semantics,
Create a new shader program.
See the documentation of ProgramBuilder::new
for further details.
pub fn new_tess(
&mut self
) -> TessBuilder<'_, Self::Backend, (), (), (), Interleaved> where
Self::Backend: TessBackend<(), (), (), Interleaved>,
[src]
&mut self
) -> TessBuilder<'_, Self::Backend, (), (), (), Interleaved> where
Self::Backend: TessBackend<(), (), (), Interleaved>,
Create a TessBuilder
.
See the documentation of TessBuilder::new
for further details.
pub fn new_deinterleaved_tess<V, W>(
&mut self
) -> TessBuilder<'_, Self::Backend, V, (), W, Deinterleaved> where
Self::Backend: TessBackend<V, (), W, Deinterleaved>,
V: TessVertexData<Deinterleaved>,
W: TessVertexData<Deinterleaved>,
[src]
&mut self
) -> TessBuilder<'_, Self::Backend, V, (), W, Deinterleaved> where
Self::Backend: TessBackend<V, (), W, Deinterleaved>,
V: TessVertexData<Deinterleaved>,
W: TessVertexData<Deinterleaved>,
Create a TessBuilder
with deinterleaved memory.
See the documentation of TessBuilder::new
for further details.
pub fn new_texture<D, P>(
&mut self,
size: D::Size,
mipmaps: usize,
sampler: Sampler
) -> Result<Texture<Self::Backend, D, P>, TextureError> where
Self::Backend: TextureBackend<D, P>,
D: Dimensionable,
P: Pixel,
[src]
&mut self,
size: D::Size,
mipmaps: usize,
sampler: Sampler
) -> Result<Texture<Self::Backend, D, P>, TextureError> where
Self::Backend: TextureBackend<D, P>,
D: Dimensionable,
P: Pixel,
Create a new texture.
Feel free to have a look at the documentation of Texture::new
for further details.