pub enum Gl {
Gl(Gl),
Gles(Gles2),
}
Variants§
Implementations§
source§impl Gl
impl Gl
pub fn get_type(&self) -> GlType
pub fn gl_fns(gl: Gl) -> Rc<Gl>
pub fn gles_fns(gl: Gles2) -> Rc<Gl>
pub fn gen_framebuffers(&self, n: GLsizei) -> Vec<GLuint>
pub fn gen_textures(&self, n: GLsizei) -> Vec<GLuint>
pub fn gen_renderbuffers(&self, n: GLsizei) -> Vec<GLuint>
pub fn gen_buffers(&self, n: GLsizei) -> Vec<GLuint>
pub fn gen_vertex_arrays(&self, n: GLsizei) -> Vec<GLuint>
pub fn shader_source(&self, shader: GLuint, strings: &[&[u8]])
pub fn create_program(&self) -> GLuint
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<'_>, )
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], )
pub fn copy_tex_image_2d( &self, target: GLenum, level: GLint, internal_format: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint, )
pub fn copy_tex_sub_image_2d( &self, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei, )
pub fn compressed_tex_image_2d( &self, target: GLenum, level: GLint, internal_format: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: &[u8], )
pub fn compressed_tex_sub_image_2d( &self, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: &[u8], )
pub fn tex_storage_2d( &self, target: GLenum, levels: GLsizei, internal_format: GLenum, width: GLsizei, height: GLsizei, )
pub fn tex_storage_3d( &self, target: GLenum, levels: GLsizei, internal_format: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, )
pub fn generate_mipmap(&self, target: GLenum)
pub fn active_texture(&self, texture: GLenum)
pub fn attach_shader(&self, program: GLuint, shader: GLuint)
pub fn create_shader(&self, shader_type: GLenum) -> GLuint
pub fn delete_shader(&self, shader: GLuint)
pub fn detach_shader(&self, program: GLuint, shader: GLuint)
pub fn bind_buffer(&self, target: GLenum, buffer: GLuint)
pub fn delete_buffers(&self, buffers: &[GLuint])
pub fn copy_buffer_sub_data( &self, read_target: u32, write_target: u32, read_offset: isize, write_offset: isize, size: isize, )
pub fn map_buffer_range( &self, target: GLenum, offset: GLintptr, length: GLsizeiptr, access: GLbitfield, ) -> *mut c_void
pub fn unmap_buffer(&self, target: GLenum)
pub fn link_program(&self, program: GLuint)
pub fn validate_program(&self, program: GLuint)
pub fn delete_program(&self, program: GLuint)
pub fn delete_vertex_arrays(&self, vertex_arrays: &[GLuint])
pub fn bind_vertex_array(&self, vao: GLuint)
pub fn enable_vertex_attrib_array(&self, index: GLuint)
pub fn disable_vertex_attrib_array(&self, index: GLuint)
pub fn vertex_attrib_4f( &self, index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat, )
pub fn vertex_attrib_4i( &self, index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint, )
pub fn vertex_attrib_4ui( &self, index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint, )
pub fn vertex_attrib_pointer_f32( &self, index: GLuint, size: GLint, normalized: bool, stride: GLsizei, offset: GLuint, )
pub fn vertex_attrib_pointer( &self, index: GLuint, size: GLint, type_: GLenum, normalized: bool, stride: GLsizei, offset: GLuint, )
pub fn vertex_attrib_divisor(&self, index: GLuint, divisor: GLuint)
pub fn bind_attrib_location(&self, program: GLuint, index: GLuint, name: &str)
pub unsafe fn get_uniform_iv( &self, program: GLuint, location: GLint, result: &mut [GLint], )
pub unsafe fn get_uniform_uiv( &self, program: GLuint, location: GLint, result: &mut [GLuint], )
pub unsafe fn get_uniform_fv( &self, program: GLuint, location: GLint, result: &mut [GLfloat], )
pub fn hint(&self, param_name: GLenum, param_val: GLenum)
pub fn blend_color(&self, r: f32, g: f32, b: f32, a: f32)
pub fn blend_func(&self, sfactor: GLenum, dfactor: GLenum)
pub fn blend_func_separate( &self, src_rgb: GLenum, dest_rgb: GLenum, src_alpha: GLenum, dest_alpha: GLenum, )
pub fn blend_equation(&self, mode: GLenum)
pub fn blend_equation_separate(&self, mode_rgb: GLenum, mode_alpha: GLenum)
pub fn color_mask(&self, r: bool, g: bool, b: bool, a: bool)
pub fn cull_face(&self, mode: GLenum)
pub fn front_face(&self, mode: GLenum)
pub fn depth_func(&self, func: GLenum)
pub fn depth_mask(&self, flag: bool)
pub fn depth_range(&self, near: f64, far: f64)
pub fn line_width(&self, width: GLfloat)
pub fn polygon_offset(&self, factor: GLfloat, units: GLfloat)
pub fn sample_coverage(&self, value: GLclampf, invert: bool)
pub fn clear_color(&self, r: f32, g: f32, b: f32, a: f32)
pub fn clear_depth(&self, depth: f64)
pub fn clear_stencil(&self, s: GLint)
pub fn clear(&self, buffer_mask: GLbitfield)
pub fn scissor(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
pub fn stencil_op(&self, sfail: GLenum, dpfail: GLenum, dppass: GLenum)
pub fn stencil_op_separate( &self, face: GLenum, sfail: GLenum, dpfail: GLenum, dppass: GLenum, )
pub fn stencil_mask(&self, mask: GLuint)
pub fn stencil_mask_separate(&self, face: GLenum, mask: GLuint)
pub fn stencil_func(&self, func: GLenum, ref_: GLint, mask: GLuint)
pub fn stencil_func_separate( &self, face: GLenum, func: GLenum, ref_: GLint, mask: GLuint, )
pub fn is_enabled(&self, cap: GLenum) -> bool
pub fn enable(&self, cap: GLenum)
pub fn disable(&self, cap: GLenum)
pub fn finish(&self)
pub fn flush(&self)
pub fn get_string(&self, which: GLenum) -> String
pub fn get_string_i(&self, which: GLenum, index: GLuint) -> String
pub unsafe fn get_shader_iv( &self, shader: GLuint, pname: GLenum, result: &mut [GLint], )
pub fn get_shader_precision_format( &self, shader_type: GLuint, precision_type: GLuint, ) -> (GLint, GLint, GLint)
pub fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
pub fn get_framebuffer_attachment_parameter_iv( &self, target: GLenum, attachment: GLenum, pname: GLenum, ) -> GLint
pub fn get_internal_format_iv( &self, target: GLenum, internalformat: GLenum, pname: GLenum, result: &mut [GLint], )
pub fn get_renderbuffer_parameter_iv( &self, target: GLenum, pname: GLenum, ) -> GLint
pub fn delete_renderbuffers(&self, buffers: &[GLuint])
pub fn delete_textures(&self, textures: &[GLuint])
pub fn delete_framebuffers(&self, framebuffers: &[GLuint])
pub fn bind_renderbuffer(&self, target: GLenum, renderbuffer: GLuint)
pub fn is_renderbuffer(&self, renderbuffer: GLuint) -> bool
pub fn bind_framebuffer(&self, target: GLenum, framebuffer: GLuint)
pub fn is_framebuffer(&self, framebuffer: GLuint) -> bool
pub fn bind_texture(&self, target: GLenum, texture: GLuint)
pub fn is_texture(&self, texture: GLuint) -> bool
pub fn is_shader(&self, shader: GLuint) -> bool
pub unsafe fn buffer_data( &self, target: GLenum, size: GLsizeiptr, data: *const GLvoid, usage: GLenum, )
pub unsafe fn buffer_sub_data( &self, target: GLenum, offset: isize, size: GLsizeiptr, data: *const GLvoid, )
pub fn read_buffer(&self, buffer: GLenum)
pub fn draw_buffers(&self, bufs: &[GLenum])
pub fn draw_arrays(&self, mode: GLenum, first: GLint, count: GLsizei)
pub fn draw_arrays_instanced( &self, mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei, )
pub fn draw_elements( &self, mode: GLenum, count: GLsizei, element_type: GLenum, indices_offset: GLuint, )
pub fn draw_elements_instanced( &self, mode: GLenum, count: GLsizei, element_type: GLenum, indices_offset: GLuint, primcount: GLsizei, )
pub fn framebuffer_renderbuffer( &self, target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: GLuint, )
pub fn framebuffer_texture_2d( &self, target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint, )
pub fn framebuffer_texture_layer( &self, target: GLenum, attachment: GLenum, texture: GLuint, level: GLint, layer: GLint, )
pub fn invalidate_framebuffer(&self, target: GLenum, attachments: &[GLenum])
pub fn invalidate_sub_framebuffer( &self, target: GLenum, attachments: &[GLenum], x: i32, y: i32, width: GLsizei, height: GLsizei, )
pub fn renderbuffer_storage( &self, target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei, )
pub fn renderbuffer_storage_multisample( &self, target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, )
pub fn check_framebuffer_status(&self, target: GLenum) -> GLenum
pub fn get_error(&self) -> GLenum
pub fn tex_parameter_i(&self, target: GLenum, pname: GLenum, param: GLint)
pub fn tex_parameter_f(&self, target: GLenum, pname: GLenum, param: GLfloat)
pub fn get_tex_parameter_iv(&self, target: GLenum, pname: GLenum) -> GLint
pub fn get_tex_parameter_fv(&self, target: GLenum, pname: GLenum) -> GLfloat
pub fn get_active_attrib( &self, program: GLuint, index: GLuint, ) -> (i32, u32, String)
pub fn get_active_uniform( &self, program: GLuint, index: GLuint, ) -> (i32, u32, String)
pub fn get_attrib_location(&self, program: GLuint, name: &str) -> c_int
pub fn get_frag_data_location(&self, program: GLuint, name: &str) -> c_int
pub fn get_uniform_location(&self, program: GLuint, name: &str) -> c_int
pub fn get_uniform_block_index(&self, program: GLuint, name: &str) -> GLuint
pub fn get_uniform_indices( &self, program: GLuint, names: &[&str], ) -> Vec<GLuint>
pub fn get_active_uniforms_iv( &self, program: GLuint, uniforms: &[GLuint], pname: GLenum, ) -> Vec<GLint>
pub fn get_active_uniform_block_iv( &self, program: GLuint, index: GLuint, pname: GLenum, ) -> Vec<GLint>
pub fn get_active_uniform_block_name( &self, program: GLuint, index: GLuint, ) -> String
pub fn uniform_block_binding( &self, program: GLuint, uniform_block_index: GLuint, uniform_block_binding: GLuint, )
pub fn bind_buffer_base(&self, program: GLenum, index: GLuint, buffer: GLuint)
pub fn bind_buffer_range( &self, program: GLenum, index: GLuint, buffer: GLuint, offset: GLintptr, size: GLsizeiptr, )
pub fn get_program_info_log(&self, program: GLuint) -> String
pub unsafe fn get_program_iv( &self, program: GLuint, pname: GLenum, result: &mut [GLint], )
pub unsafe fn get_vertex_attrib_fv( &self, index: GLuint, pname: GLenum, result: &mut [GLfloat], )
pub fn get_shader_info_log(&self, shader: GLuint) -> String
pub unsafe fn get_integer_v(&self, name: GLenum, result: &mut [GLint])
pub unsafe fn get_integer64_v(&self, name: GLenum, result: &mut [GLint64])
pub unsafe fn get_integeri_v( &self, name: GLenum, index: GLuint, result: &mut [GLint], )
pub unsafe fn get_integer64i_v( &self, name: GLenum, index: GLuint, result: &mut [GLint64], )
pub unsafe fn get_boolean_v(&self, name: GLenum, result: &mut [GLboolean])
pub unsafe fn get_float_v(&self, name: GLenum, result: &mut [GLfloat])
pub fn compile_shader(&self, shader: GLuint)
pub fn pixel_store_i(&self, name: GLenum, param: GLint)
pub fn read_pixels_into_buffer( &self, x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, pixel_type: GLenum, buffer: &mut [u8], )
sourcepub 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,
)
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.
pub fn read_pixels( &self, x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, pixel_type: GLenum, ) -> Vec<u8>
pub fn fence_sync(&self, condition: GLenum, flags: GLbitfield) -> GLsync
pub fn client_wait_sync( &self, sync: GLsync, flags: GLbitfield, timeout: GLuint64, ) -> GLenum
pub fn wait_sync(&self, sync: GLsync, flags: GLbitfield, timeout: GLuint64)
pub fn get_sync_iv(&self, sync: GLsync, pname: GLenum) -> Vec<GLint>
pub fn is_sync(&self, sync: GLsync) -> bool
pub fn delete_sync(&self, sync: GLsync)
pub fn uniform_1f(&self, location: GLint, v0: GLfloat)
pub fn uniform_1fv(&self, location: GLint, values: &[f32])
pub fn uniform_1i(&self, location: GLint, v0: GLint)
pub fn uniform_1iv(&self, location: GLint, values: &[i32])
pub fn uniform_1ui(&self, location: GLint, v0: GLuint)
pub fn uniform_1uiv(&self, location: GLint, values: &[u32])
pub fn uniform_2f(&self, location: GLint, v0: GLfloat, v1: GLfloat)
pub fn uniform_2fv(&self, location: GLint, values: &[f32])
pub fn uniform_2i(&self, location: GLint, v0: GLint, v1: GLint)
pub fn uniform_2iv(&self, location: GLint, values: &[i32])
pub fn uniform_2ui(&self, location: GLint, v0: GLuint, v1: GLuint)
pub fn uniform_2uiv(&self, location: GLint, values: &[u32])
pub fn uniform_3f(&self, location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat)
pub fn uniform_3fv(&self, location: GLint, values: &[f32])
pub fn uniform_3i(&self, location: GLint, v0: GLint, v1: GLint, v2: GLint)
pub fn uniform_3iv(&self, location: GLint, values: &[i32])
pub fn uniform_3ui(&self, location: GLint, v0: GLuint, v1: GLuint, v2: GLuint)
pub fn uniform_3uiv(&self, location: GLint, values: &[u32])
pub fn uniform_4f( &self, location: GLint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat, )
pub fn uniform_4i( &self, location: GLint, x: GLint, y: GLint, z: GLint, w: GLint, )
pub fn uniform_4iv(&self, location: GLint, values: &[i32])
pub fn uniform_4ui( &self, location: GLint, x: GLuint, y: GLuint, z: GLuint, w: GLuint, )
pub fn uniform_4uiv(&self, location: GLint, values: &[u32])
pub fn uniform_4fv(&self, location: GLint, values: &[f32])
pub fn uniform_matrix_2fv( &self, location: GLint, transpose: bool, values: &[f32], )
pub fn uniform_matrix_3fv( &self, location: GLint, transpose: bool, values: &[f32], )
pub fn uniform_matrix_4fv( &self, location: GLint, transpose: bool, values: &[f32], )
pub fn uniform_matrix_3x2fv( &self, location: GLint, transpose: bool, values: &[f32], )
pub fn uniform_matrix_4x2fv( &self, location: GLint, transpose: bool, values: &[f32], )
pub fn uniform_matrix_2x3fv( &self, location: GLint, transpose: bool, values: &[f32], )
pub fn uniform_matrix_4x3fv( &self, location: GLint, transpose: bool, values: &[f32], )
pub fn uniform_matrix_2x4fv( &self, location: GLint, transpose: bool, values: &[f32], )
pub fn uniform_matrix_3x4fv( &self, location: GLint, transpose: bool, values: &[f32], )
pub fn use_program(&self, program: GLuint)
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, )
pub fn gen_queries(&self, n: GLsizei) -> Vec<GLuint>
pub fn begin_query(&self, target: GLenum, id: GLuint)
pub fn end_query(&self, target: GLenum)
pub fn delete_queries(&self, ids: &[GLuint])
pub fn is_query(&self, id: GLuint) -> bool
pub fn get_query_iv(&self, target: GLenum, pname: GLenum) -> i32
pub fn get_query_object_iv(&self, id: GLuint, pname: GLenum) -> i32
pub fn get_query_object_uiv(&self, id: GLuint, pname: GLenum) -> u32
pub fn get_query_object_i64v(&self, id: GLuint, pname: GLenum) -> i64
pub fn get_query_object_ui64v(&self, id: GLuint, pname: GLenum) -> u64
pub fn gen_samplers(&self, n: GLsizei) -> Vec<GLuint>
pub fn delete_samplers(&self, samplers: &[GLuint])
pub fn is_sampler(&self, sampler: GLuint) -> bool
pub fn bind_sampler(&self, target: GLenum, sampler: GLuint)
pub fn get_sampler_parameter_iv( &self, sampler: GLuint, pname: GLenum, ) -> Vec<GLint>
pub fn get_sampler_parameter_fv( &self, sampler: GLuint, pname: GLenum, ) -> Vec<GLfloat>
pub fn sampler_parameter_i(&self, sampler: GLuint, pname: GLenum, param: GLint)
pub fn sampler_parameter_f( &self, sampler: GLuint, pname: GLenum, param: GLfloat, )
pub fn sampler_parameter_iv( &self, sampler: GLuint, pname: GLenum, params: &[GLint], )
pub fn sampler_parameter_fv( &self, sampler: GLuint, pname: GLenum, params: &[GLfloat], )
pub fn gen_transform_feedbacks(&self) -> u32
pub fn delete_transform_feedbacks(&self, id: GLuint)
pub fn is_transform_feedback(&self, id: GLuint) -> bool
pub fn bind_transform_feedback(&self, target: GLenum, id: u32)
pub fn begin_transform_feedback(&self, mode: GLenum)
pub fn end_transform_feedback(&self)
pub fn pause_transform_feedback(&self)
pub fn resume_transform_feedback(&self)
pub fn get_transform_feedback_varying( &self, program: GLuint, index: GLuint, ) -> (i32, u32, String)
pub fn transform_feedback_varyings( &self, program: GLuint, varyings: &[String], buffer_mode: GLenum, )
pub fn clear_buffer_iv( &self, buffer: GLenum, draw_buffer: GLint, value: &[GLint], )
pub fn clear_buffer_uiv( &self, buffer: GLenum, draw_buffer: GLint, value: &[GLuint], )
pub fn clear_buffer_fv( &self, buffer: GLenum, draw_buffer: GLint, value: &[GLfloat], )
pub fn clear_buffer_fi( &self, buffer: GLenum, draw_buffer: GLint, depth: GLfloat, stencil: GLint, )
Auto Trait Implementations§
impl Freeze for Gl
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more