Enum sparkle::gl::Gl

source ·
pub enum Gl {
    Gl(Gl),
    Gles(Gles2),
}

Variants§

§

Gl(Gl)

§

Gles(Gles2)

Implementations§

source§

impl Gl

source

pub fn get_type(&self) -> GlType

source

pub fn gl_fns(gl: Gl) -> Rc<Gl>

source

pub fn gles_fns(gl: Gles2) -> Rc<Gl>

source

pub fn gen_framebuffers(&self, n: GLsizei) -> Vec<GLuint>

source

pub fn gen_textures(&self, n: GLsizei) -> Vec<GLuint>

source

pub fn gen_renderbuffers(&self, n: GLsizei) -> Vec<GLuint>

source

pub fn gen_buffers(&self, n: GLsizei) -> Vec<GLuint>

source

pub fn gen_vertex_arrays(&self, n: GLsizei) -> Vec<GLuint>

source

pub fn shader_source(&self, shader: GLuint, strings: &[&[u8]])

source

pub fn create_program(&self) -> GLuint

source

pub fn tex_image_2d( &self, target: GLenum, level: GLint, internal_format: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, ty: GLenum, source: TexImageSource<'_> )

source

pub fn tex_sub_image_2d( &self, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, ty: GLenum, data: &[u8] )

source

pub fn copy_tex_image_2d( &self, target: GLenum, level: GLint, internal_format: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint )

source

pub fn copy_tex_sub_image_2d( &self, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei )

source

pub fn compressed_tex_image_2d( &self, target: GLenum, level: GLint, internal_format: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: &[u8] )

source

pub fn compressed_tex_sub_image_2d( &self, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: &[u8] )

source

pub fn tex_storage_2d( &self, target: GLenum, levels: GLsizei, internal_format: GLenum, width: GLsizei, height: GLsizei )

source

pub fn tex_storage_3d( &self, target: GLenum, levels: GLsizei, internal_format: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei )

source

pub fn generate_mipmap(&self, target: GLenum)

source

pub fn active_texture(&self, texture: GLenum)

source

pub fn attach_shader(&self, program: GLuint, shader: GLuint)

source

pub fn create_shader(&self, shader_type: GLenum) -> GLuint

source

pub fn delete_shader(&self, shader: GLuint)

source

pub fn detach_shader(&self, program: GLuint, shader: GLuint)

source

pub fn bind_buffer(&self, target: GLenum, buffer: GLuint)

source

pub fn delete_buffers(&self, buffers: &[GLuint])

source

pub fn copy_buffer_sub_data( &self, read_target: u32, write_target: u32, read_offset: isize, write_offset: isize, size: isize )

source

pub fn map_buffer_range( &self, target: GLenum, offset: GLintptr, length: GLsizeiptr, access: GLbitfield ) -> *mut c_void

source

pub fn unmap_buffer(&self, target: GLenum)

source

pub fn validate_program(&self, program: GLuint)

source

pub fn delete_program(&self, program: GLuint)

source

pub fn delete_vertex_arrays(&self, vertex_arrays: &[GLuint])

source

pub fn bind_vertex_array(&self, vao: GLuint)

source

pub fn enable_vertex_attrib_array(&self, index: GLuint)

source

pub fn disable_vertex_attrib_array(&self, index: GLuint)

source

pub fn vertex_attrib_4f( &self, index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat )

source

pub fn vertex_attrib_4i( &self, index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint )

source

pub fn vertex_attrib_4ui( &self, index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint )

source

pub fn vertex_attrib_pointer_f32( &self, index: GLuint, size: GLint, normalized: bool, stride: GLsizei, offset: GLuint )

source

pub fn vertex_attrib_pointer( &self, index: GLuint, size: GLint, type_: GLenum, normalized: bool, stride: GLsizei, offset: GLuint )

source

pub fn vertex_attrib_divisor(&self, index: GLuint, divisor: GLuint)

source

pub fn bind_attrib_location(&self, program: GLuint, index: GLuint, name: &str)

source

pub unsafe fn get_uniform_iv( &self, program: GLuint, location: GLint, result: &mut [GLint] )

source

pub unsafe fn get_uniform_uiv( &self, program: GLuint, location: GLint, result: &mut [GLuint] )

source

pub unsafe fn get_uniform_fv( &self, program: GLuint, location: GLint, result: &mut [GLfloat] )

source

pub fn hint(&self, param_name: GLenum, param_val: GLenum)

source

pub fn blend_color(&self, r: f32, g: f32, b: f32, a: f32)

source

pub fn blend_func(&self, sfactor: GLenum, dfactor: GLenum)

source

pub fn blend_func_separate( &self, src_rgb: GLenum, dest_rgb: GLenum, src_alpha: GLenum, dest_alpha: GLenum )

source

pub fn blend_equation(&self, mode: GLenum)

source

pub fn blend_equation_separate(&self, mode_rgb: GLenum, mode_alpha: GLenum)

source

pub fn color_mask(&self, r: bool, g: bool, b: bool, a: bool)

source

pub fn cull_face(&self, mode: GLenum)

source

pub fn front_face(&self, mode: GLenum)

source

pub fn depth_func(&self, func: GLenum)

source

pub fn depth_mask(&self, flag: bool)

source

pub fn depth_range(&self, near: f64, far: f64)

source

pub fn line_width(&self, width: GLfloat)

source

pub fn polygon_offset(&self, factor: GLfloat, units: GLfloat)

source

pub fn sample_coverage(&self, value: GLclampf, invert: bool)

source

pub fn clear_color(&self, r: f32, g: f32, b: f32, a: f32)

source

pub fn clear_depth(&self, depth: f64)

source

pub fn clear_stencil(&self, s: GLint)

source

pub fn clear(&self, buffer_mask: GLbitfield)

source

pub fn scissor(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei)

source

pub fn stencil_op(&self, sfail: GLenum, dpfail: GLenum, dppass: GLenum)

source

pub fn stencil_op_separate( &self, face: GLenum, sfail: GLenum, dpfail: GLenum, dppass: GLenum )

source

pub fn stencil_mask(&self, mask: GLuint)

source

pub fn stencil_mask_separate(&self, face: GLenum, mask: GLuint)

source

pub fn stencil_func(&self, func: GLenum, ref_: GLint, mask: GLuint)

source

pub fn stencil_func_separate( &self, face: GLenum, func: GLenum, ref_: GLint, mask: GLuint )

source

pub fn is_enabled(&self, cap: GLenum) -> bool

source

pub fn enable(&self, cap: GLenum)

source

pub fn disable(&self, cap: GLenum)

source

pub fn finish(&self)

source

pub fn flush(&self)

source

pub fn get_string(&self, which: GLenum) -> String

source

pub fn get_string_i(&self, which: GLenum, index: GLuint) -> String

source

pub unsafe fn get_shader_iv( &self, shader: GLuint, pname: GLenum, result: &mut [GLint] )

source

pub fn get_shader_precision_format( &self, shader_type: GLuint, precision_type: GLuint ) -> (GLint, GLint, GLint)

source

pub fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei)

source

pub fn get_framebuffer_attachment_parameter_iv( &self, target: GLenum, attachment: GLenum, pname: GLenum ) -> GLint

source

pub fn get_internal_format_iv( &self, target: GLenum, internalformat: GLenum, pname: GLenum, result: &mut [GLint] )

source

pub fn get_renderbuffer_parameter_iv( &self, target: GLenum, pname: GLenum ) -> GLint

source

pub fn delete_renderbuffers(&self, buffers: &[GLuint])

source

pub fn delete_textures(&self, textures: &[GLuint])

source

pub fn delete_framebuffers(&self, framebuffers: &[GLuint])

source

pub fn bind_renderbuffer(&self, target: GLenum, renderbuffer: GLuint)

source

pub fn is_renderbuffer(&self, renderbuffer: GLuint) -> bool

source

pub fn bind_framebuffer(&self, target: GLenum, framebuffer: GLuint)

source

pub fn is_framebuffer(&self, framebuffer: GLuint) -> bool

source

pub fn bind_texture(&self, target: GLenum, texture: GLuint)

source

pub fn is_texture(&self, texture: GLuint) -> bool

source

pub fn is_shader(&self, shader: GLuint) -> bool

source

pub unsafe fn buffer_data( &self, target: GLenum, size: GLsizeiptr, data: *const GLvoid, usage: GLenum )

source

pub unsafe fn buffer_sub_data( &self, target: GLenum, offset: isize, size: GLsizeiptr, data: *const GLvoid )

source

pub fn read_buffer(&self, buffer: GLenum)

source

pub fn draw_buffers(&self, bufs: &[GLenum])

source

pub fn draw_arrays(&self, mode: GLenum, first: GLint, count: GLsizei)

source

pub fn draw_arrays_instanced( &self, mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei )

source

pub fn draw_elements( &self, mode: GLenum, count: GLsizei, element_type: GLenum, indices_offset: GLuint )

source

pub fn draw_elements_instanced( &self, mode: GLenum, count: GLsizei, element_type: GLenum, indices_offset: GLuint, primcount: GLsizei )

source

pub fn framebuffer_renderbuffer( &self, target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: GLuint )

source

pub fn framebuffer_texture_2d( &self, target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint )

source

pub fn framebuffer_texture_layer( &self, target: GLenum, attachment: GLenum, texture: GLuint, level: GLint, layer: GLint )

source

pub fn invalidate_framebuffer(&self, target: GLenum, attachments: &[GLenum])

source

pub fn invalidate_sub_framebuffer( &self, target: GLenum, attachments: &[GLenum], x: i32, y: i32, width: GLsizei, height: GLsizei )

source

pub fn renderbuffer_storage( &self, target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei )

source

pub fn renderbuffer_storage_multisample( &self, target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei )

source

pub fn check_framebuffer_status(&self, target: GLenum) -> GLenum

source

pub fn get_error(&self) -> GLenum

source

pub fn tex_parameter_i(&self, target: GLenum, pname: GLenum, param: GLint)

source

pub fn tex_parameter_f(&self, target: GLenum, pname: GLenum, param: GLfloat)

source

pub fn get_tex_parameter_iv(&self, target: GLenum, pname: GLenum) -> GLint

source

pub fn get_tex_parameter_fv(&self, target: GLenum, pname: GLenum) -> GLfloat

source

pub fn get_active_attrib( &self, program: GLuint, index: GLuint ) -> (i32, u32, String)

source

pub fn get_active_uniform( &self, program: GLuint, index: GLuint ) -> (i32, u32, String)

source

pub fn get_attrib_location(&self, program: GLuint, name: &str) -> c_int

source

pub fn get_frag_data_location(&self, program: GLuint, name: &str) -> c_int

source

pub fn get_uniform_location(&self, program: GLuint, name: &str) -> c_int

source

pub fn get_uniform_block_index(&self, program: GLuint, name: &str) -> GLuint

source

pub fn get_uniform_indices( &self, program: GLuint, names: &[&str] ) -> Vec<GLuint>

source

pub fn get_active_uniforms_iv( &self, program: GLuint, uniforms: &[GLuint], pname: GLenum ) -> Vec<GLint>

source

pub fn get_active_uniform_block_iv( &self, program: GLuint, index: GLuint, pname: GLenum ) -> Vec<GLint>

source

pub fn get_active_uniform_block_name( &self, program: GLuint, index: GLuint ) -> String

source

pub fn uniform_block_binding( &self, program: GLuint, uniform_block_index: GLuint, uniform_block_binding: GLuint )

source

pub fn bind_buffer_base(&self, program: GLenum, index: GLuint, buffer: GLuint)

source

pub fn bind_buffer_range( &self, program: GLenum, index: GLuint, buffer: GLuint, offset: GLintptr, size: GLsizeiptr )

source

pub fn get_program_info_log(&self, program: GLuint) -> String

source

pub unsafe fn get_program_iv( &self, program: GLuint, pname: GLenum, result: &mut [GLint] )

source

pub unsafe fn get_vertex_attrib_fv( &self, index: GLuint, pname: GLenum, result: &mut [GLfloat] )

source

pub fn get_shader_info_log(&self, shader: GLuint) -> String

source

pub unsafe fn get_integer_v(&self, name: GLenum, result: &mut [GLint])

source

pub unsafe fn get_integer64_v(&self, name: GLenum, result: &mut [GLint64])

source

pub unsafe fn get_integeri_v( &self, name: GLenum, index: GLuint, result: &mut [GLint] )

source

pub unsafe fn get_integer64i_v( &self, name: GLenum, index: GLuint, result: &mut [GLint64] )

source

pub unsafe fn get_boolean_v(&self, name: GLenum, result: &mut [GLboolean])

source

pub unsafe fn get_float_v(&self, name: GLenum, result: &mut [GLfloat])

source

pub fn compile_shader(&self, shader: GLuint)

source

pub fn pixel_store_i(&self, name: GLenum, param: GLint)

source

pub fn read_pixels_into_buffer( &self, x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, pixel_type: GLenum, buffer: &mut [u8] )

source

pub unsafe fn read_pixels_into_pixel_pack_buffer( &self, x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, pixel_type: GLenum, buffer_byte_offset: usize )

Used when a WebGLBuffer object is bound to PIXEL_PACK_BUFFER. Reads the current pixel buffer into the bound buffer object at the provided offset. Unsafe because no validation is performed to ensure that there is actually a buffer object bound; GL will write at an invalid pointer value in this case.

source

pub fn read_pixels( &self, x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, pixel_type: GLenum ) -> Vec<u8>

source

pub fn fence_sync(&self, condition: GLenum, flags: GLbitfield) -> GLsync

source

pub fn client_wait_sync( &self, sync: GLsync, flags: GLbitfield, timeout: GLuint64 ) -> GLenum

source

pub fn wait_sync(&self, sync: GLsync, flags: GLbitfield, timeout: GLuint64)

source

pub fn get_sync_iv(&self, sync: GLsync, pname: GLenum) -> Vec<GLint>

source

pub fn is_sync(&self, sync: GLsync) -> bool

source

pub fn delete_sync(&self, sync: GLsync)

source

pub fn uniform_1f(&self, location: GLint, v0: GLfloat)

source

pub fn uniform_1fv(&self, location: GLint, values: &[f32])

source

pub fn uniform_1i(&self, location: GLint, v0: GLint)

source

pub fn uniform_1iv(&self, location: GLint, values: &[i32])

source

pub fn uniform_1ui(&self, location: GLint, v0: GLuint)

source

pub fn uniform_1uiv(&self, location: GLint, values: &[u32])

source

pub fn uniform_2f(&self, location: GLint, v0: GLfloat, v1: GLfloat)

source

pub fn uniform_2fv(&self, location: GLint, values: &[f32])

source

pub fn uniform_2i(&self, location: GLint, v0: GLint, v1: GLint)

source

pub fn uniform_2iv(&self, location: GLint, values: &[i32])

source

pub fn uniform_2ui(&self, location: GLint, v0: GLuint, v1: GLuint)

source

pub fn uniform_2uiv(&self, location: GLint, values: &[u32])

source

pub fn uniform_3f(&self, location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat)

source

pub fn uniform_3fv(&self, location: GLint, values: &[f32])

source

pub fn uniform_3i(&self, location: GLint, v0: GLint, v1: GLint, v2: GLint)

source

pub fn uniform_3iv(&self, location: GLint, values: &[i32])

source

pub fn uniform_3ui(&self, location: GLint, v0: GLuint, v1: GLuint, v2: GLuint)

source

pub fn uniform_3uiv(&self, location: GLint, values: &[u32])

source

pub fn uniform_4f( &self, location: GLint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat )

source

pub fn uniform_4i( &self, location: GLint, x: GLint, y: GLint, z: GLint, w: GLint )

source

pub fn uniform_4iv(&self, location: GLint, values: &[i32])

source

pub fn uniform_4ui( &self, location: GLint, x: GLuint, y: GLuint, z: GLuint, w: GLuint )

source

pub fn uniform_4uiv(&self, location: GLint, values: &[u32])

source

pub fn uniform_4fv(&self, location: GLint, values: &[f32])

source

pub fn uniform_matrix_2fv( &self, location: GLint, transpose: bool, values: &[f32] )

source

pub fn uniform_matrix_3fv( &self, location: GLint, transpose: bool, values: &[f32] )

source

pub fn uniform_matrix_4fv( &self, location: GLint, transpose: bool, values: &[f32] )

source

pub fn uniform_matrix_3x2fv( &self, location: GLint, transpose: bool, values: &[f32] )

source

pub fn uniform_matrix_4x2fv( &self, location: GLint, transpose: bool, values: &[f32] )

source

pub fn uniform_matrix_2x3fv( &self, location: GLint, transpose: bool, values: &[f32] )

source

pub fn uniform_matrix_4x3fv( &self, location: GLint, transpose: bool, values: &[f32] )

source

pub fn uniform_matrix_2x4fv( &self, location: GLint, transpose: bool, values: &[f32] )

source

pub fn uniform_matrix_3x4fv( &self, location: GLint, transpose: bool, values: &[f32] )

source

pub fn use_program(&self, program: GLuint)

source

pub fn blit_framebuffer( &self, src_x0: GLint, src_y0: GLint, src_x1: GLint, src_y1: GLint, dst_x0: GLint, dst_y0: GLint, dst_x1: GLint, dst_y1: GLint, mask: GLbitfield, filter: GLenum )

source

pub fn gen_queries(&self, n: GLsizei) -> Vec<GLuint>

source

pub fn begin_query(&self, target: GLenum, id: GLuint)

source

pub fn end_query(&self, target: GLenum)

source

pub fn delete_queries(&self, ids: &[GLuint])

source

pub fn is_query(&self, id: GLuint) -> bool

source

pub fn get_query_iv(&self, target: GLenum, pname: GLenum) -> i32

source

pub fn get_query_object_iv(&self, id: GLuint, pname: GLenum) -> i32

source

pub fn get_query_object_uiv(&self, id: GLuint, pname: GLenum) -> u32

source

pub fn get_query_object_i64v(&self, id: GLuint, pname: GLenum) -> i64

source

pub fn get_query_object_ui64v(&self, id: GLuint, pname: GLenum) -> u64

source

pub fn gen_samplers(&self, n: GLsizei) -> Vec<GLuint>

source

pub fn delete_samplers(&self, samplers: &[GLuint])

source

pub fn is_sampler(&self, sampler: GLuint) -> bool

source

pub fn bind_sampler(&self, target: GLenum, sampler: GLuint)

source

pub fn get_sampler_parameter_iv( &self, sampler: GLuint, pname: GLenum ) -> Vec<GLint>

source

pub fn get_sampler_parameter_fv( &self, sampler: GLuint, pname: GLenum ) -> Vec<GLfloat>

source

pub fn sampler_parameter_i(&self, sampler: GLuint, pname: GLenum, param: GLint)

source

pub fn sampler_parameter_f( &self, sampler: GLuint, pname: GLenum, param: GLfloat )

source

pub fn sampler_parameter_iv( &self, sampler: GLuint, pname: GLenum, params: &[GLint] )

source

pub fn sampler_parameter_fv( &self, sampler: GLuint, pname: GLenum, params: &[GLfloat] )

source

pub fn gen_transform_feedbacks(&self) -> u32

source

pub fn delete_transform_feedbacks(&self, id: GLuint)

source

pub fn is_transform_feedback(&self, id: GLuint) -> bool

source

pub fn bind_transform_feedback(&self, target: GLenum, id: u32)

source

pub fn begin_transform_feedback(&self, mode: GLenum)

source

pub fn end_transform_feedback(&self)

source

pub fn pause_transform_feedback(&self)

source

pub fn resume_transform_feedback(&self)

source

pub fn get_transform_feedback_varying( &self, program: GLuint, index: GLuint ) -> (i32, u32, String)

source

pub fn transform_feedback_varyings( &self, program: GLuint, varyings: &[String], buffer_mode: GLenum )

source

pub fn clear_buffer_iv( &self, buffer: GLenum, draw_buffer: GLint, value: &[GLint] )

source

pub fn clear_buffer_uiv( &self, buffer: GLenum, draw_buffer: GLint, value: &[GLuint] )

source

pub fn clear_buffer_fv( &self, buffer: GLenum, draw_buffer: GLint, value: &[GLfloat] )

source

pub fn clear_buffer_fi( &self, buffer: GLenum, draw_buffer: GLint, depth: GLfloat, stencil: GLint )

Auto Trait Implementations§

§

impl RefUnwindSafe for Gl

§

impl Send for Gl

§

impl !Sync for Gl

§

impl Unpin for Gl

§

impl UnwindSafe for Gl

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.