Struct luminance_gl::gl33::token::GL33
[−]
[src]
pub struct GL33;
Trait Implementations
impl HasBuffer for GL33
[src]
type ABuffer = GLBuffer
A type representing minimal information to operate on a buffer. For instance, a size, a pointer, a method to retrieve data, a handle, whatever. Read more
fn new(size: usize) -> Self::ABuffer
Create a new buffer with a given size.
fn free(buffer: &mut Self::ABuffer)
Destroy a buffer.
fn write_whole<T>(buffer: &GLBuffer, values: &[T]) -> Result<(), BufferError>
Write values into the buffer. Read more
fn write<T>(buffer: &GLBuffer, off: usize, x: T) -> Result<(), BufferError> where T: Copy
Write a single value in the buffer at a given offset. Read more
fn read_whole<T>(buffer: &GLBuffer, nb: usize) -> Vec<T> where T: Copy
Read all values from the buffer.
fn read<T>(buffer: &GLBuffer, off: usize) -> Option<T> where T: Copy
Read a single value from the buffer at a given offset. Read more
impl HasFramebuffer for GL33
[src]
type Framebuffer = GLFramebuffer
Framebuffer representation.
fn new_framebuffer<L, D, CS, DS>(size: D::Size, mipmaps: usize) -> Result<(Self::Framebuffer, Vec<Self::ATexture>, Option<Self::ATexture>), FramebufferError> where L: Layerable, D: Dimensionable, D::Size: Copy, CS: ColorSlot<Self, L, D>, DS: DepthSlot<Self, L, D>
Create a new framebuffer.
fn free_framebuffer(framebuffer: &mut Self::Framebuffer)
Free a framebuffer.
fn default_framebuffer<D>(size: D::Size) -> Self::Framebuffer where D: Dimensionable, D::Size: Copy
Default framebuffer.
impl HasPipeline for GL33
[src]
fn run_pipeline<L, D, CS, DS>(cmd: &Pipeline<Self, L, D, CS, DS>) where L: Layerable, D: Dimensionable, D::Size: Copy, CS: ColorSlot<Self, L, D>, DS: DepthSlot<Self, L, D>
fn run_shading_command<T>(shading_cmd: &ShadingCommand<Self, T>)
impl HasProgram for GL33
[src]
type Program = GLuint
fn new_program(tess: Option<(&Self::AStage, &Self::AStage)>, vertex: &Self::AStage, geometry: Option<&Self::AStage>, fragment: &Self::AStage) -> Result<Self::Program, ProgramError>
Create a new program by linking it with stages.
fn free_program(program: &mut Self::Program)
Free a program.
fn map_uniform(program: &Self::Program, name: String, ty: Type, dim: Dim) -> (Self::U, Option<UniformWarning>)
Map a uniform name to its uniform representation. Can fail with ProgramError
.
fn update_uniforms<F>(program: &Self::Program, f: F) where F: Fn()
Bulk update of uniforms. The update closure should contain the code used to update as many uniforms as wished. Read more
impl HasStage for GL33
[src]
type AStage = GLuint
fn new_shader(shader_type: Type, src: &str) -> Result<Self::AStage, StageError>
fn free_shader(shader: &mut Self::AStage)
impl HasUniform for GL33
[src]
type U = GLint
Uniform representation.
fn update1_i32(u: &Self::U, x: i32)
fn update2_i32(u: &Self::U, v: [i32; 2])
fn update3_i32(u: &Self::U, v: [i32; 3])
fn update4_i32(u: &Self::U, v: [i32; 4])
fn update1_slice_i32(u: &Self::U, v: &[i32])
fn update2_slice_i32(u: &Self::U, v: &[[i32; 2]])
fn update3_slice_i32(u: &Self::U, v: &[[i32; 3]])
fn update4_slice_i32(u: &Self::U, v: &[[i32; 4]])
fn update1_u32(u: &Self::U, x: u32)
fn update2_u32(u: &Self::U, v: [u32; 2])
fn update3_u32(u: &Self::U, v: [u32; 3])
fn update4_u32(u: &Self::U, v: [u32; 4])
fn update1_slice_u32(u: &Self::U, v: &[u32])
fn update2_slice_u32(u: &Self::U, v: &[[u32; 2]])
fn update3_slice_u32(u: &Self::U, v: &[[u32; 3]])
fn update4_slice_u32(u: &Self::U, v: &[[u32; 4]])
fn update1_f32(u: &Self::U, x: f32)
fn update2_f32(u: &Self::U, v: [f32; 2])
fn update3_f32(u: &Self::U, v: [f32; 3])
fn update4_f32(u: &Self::U, v: [f32; 4])
fn update1_slice_f32(u: &Self::U, v: &[f32])
fn update2_slice_f32(u: &Self::U, v: &[[f32; 2]])
fn update3_slice_f32(u: &Self::U, v: &[[f32; 3]])
fn update4_slice_f32(u: &Self::U, v: &[[f32; 4]])
fn update22_f32(u: &Self::U, m: M22)
fn update33_f32(u: &Self::U, m: M33)
fn update44_f32(u: &Self::U, m: M44)
fn update22_slice_f32(u: &Self::U, v: &[M22])
fn update33_slice_f32(u: &Self::U, v: &[M33])
fn update44_slice_f32(u: &Self::U, v: &[M44])
fn update1_bool(u: &Self::U, x: bool)
fn update2_bool(u: &Self::U, v: [bool; 2])
fn update3_bool(u: &Self::U, v: [bool; 3])
fn update4_bool(u: &Self::U, v: [bool; 4])
fn update1_slice_bool(u: &Self::U, v: &[bool])
fn update2_slice_bool(u: &Self::U, v: &[[bool; 2]])
fn update3_slice_bool(u: &Self::U, v: &[[bool; 3]])
fn update4_slice_bool(u: &Self::U, v: &[[bool; 4]])
fn update_texture(u: &Self::U, texture: &Self::ATexture, unit: u32) where Self: HasTexture
impl HasTessellation for GL33
[src]
type Tessellation = GLTess
A type representing tessellation on GPU.
fn new<T: 'static>(mode: Mode, vertices: &[T], indices: Option<&[u32]>) -> Self::Tessellation where T: Vertex
Create a Tessellation
from its vertices and a Mode
. Read more
fn destroy(tessellation: &mut Self::Tessellation)
Destroy a Tessellation
.
impl HasTexture for GL33
[src]
type ATexture = GLTexture
fn new_texture<L, D, P>(size: D::Size, mipmaps: usize, sampler: &Sampler) -> Self::ATexture where L: Layerable, D: Dimensionable, D::Size: Copy, P: Pixel
Create a new texture. Read more
fn free(texture: &mut Self::ATexture)
Destroy a texture.
fn clear_part<L, D, P>(texture: &Self::ATexture, gen_mipmaps: bool, off: D::Offset, size: D::Size, pixel: P::Encoding) where L: Layerable, D: Dimensionable, D::Offset: Copy, D::Size: Copy, P: Pixel, P::Encoding: Copy
Clear the texture’s texels by setting them all to the same value.
fn upload_part<L, D, P>(texture: &Self::ATexture, gen_mipmaps: bool, off: D::Offset, size: D::Size, texels: &[P::Encoding]) where L: Layerable, D::Offset: Copy, D::Size: Copy, D: Dimensionable, P: Pixel
Upload texels to the texture’s memory.
fn upload_part_raw<L, D, P>(texture: &Self::ATexture, gen_mipmaps: bool, off: D::Offset, size: D::Size, texels: &[P::RawEncoding]) where L: Layerable, D::Offset: Copy, D::Size: Copy, D: Dimensionable, P: Pixel
Upload raw texels to the texture’s memory.
fn get_raw_texels<P>(texture: &Self::ATexture) -> Vec<P::RawEncoding> where P: Pixel, P::RawEncoding: Copy
Retrieve the texels as a collection of P::RawEncoding.