pub struct Context { /* private fields */ }
Implementations§
source§impl Context
impl Context
pub fn from_webgl1_context(context: WebGlRenderingContext) -> Self
pub fn from_webgl2_context(context: WebGl2RenderingContext) -> Self
pub unsafe fn tex_image_2d_with_image_bitmap( &self, target: u32, level: i32, internal_format: i32, format: u32, ty: u32, pixels: &ImageBitmap )
sourcepub unsafe fn tex_image_2d_with_image_bitmap_and_width_and_height(
&self,
target: u32,
level: i32,
internal_format: i32,
width: i32,
height: i32,
format: u32,
ty: u32,
pixels: &ImageBitmap
)
pub unsafe fn tex_image_2d_with_image_bitmap_and_width_and_height( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, format: u32, ty: u32, pixels: &ImageBitmap )
WebGL2 Only
pub unsafe fn tex_image_2d_with_html_canvas( &self, target: u32, level: i32, internal_format: i32, format: u32, ty: u32, canvas: &HtmlCanvasElement )
sourcepub unsafe fn tex_image_2d_with_html_canvas_and_width_and_height(
&self,
target: u32,
level: i32,
internal_format: i32,
width: i32,
height: i32,
format: u32,
ty: u32,
canvas: &HtmlCanvasElement
)
pub unsafe fn tex_image_2d_with_html_canvas_and_width_and_height( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, format: u32, ty: u32, canvas: &HtmlCanvasElement )
WebGL2 Only
pub unsafe fn tex_image_2d_with_html_image( &self, target: u32, level: i32, internal_format: i32, format: u32, ty: u32, image: &HtmlImageElement )
sourcepub unsafe fn tex_image_2d_with_html_image_and_width_and_height(
&self,
target: u32,
level: i32,
internal_format: i32,
width: i32,
height: i32,
format: u32,
ty: u32,
image: &HtmlImageElement
)
pub unsafe fn tex_image_2d_with_html_image_and_width_and_height( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, format: u32, ty: u32, image: &HtmlImageElement )
WebGL2 Only
pub unsafe fn tex_image_2d_with_html_video( &self, target: u32, level: i32, internal_format: i32, format: u32, ty: u32, video: &HtmlVideoElement )
sourcepub unsafe fn tex_image_2d_with_html_video_and_width_and_height(
&self,
target: u32,
level: i32,
internal_format: i32,
width: i32,
height: i32,
format: u32,
ty: u32,
video: &HtmlVideoElement
)
pub unsafe fn tex_image_2d_with_html_video_and_width_and_height( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, format: u32, ty: u32, video: &HtmlVideoElement )
WebGL2 Only
pub unsafe fn tex_sub_image_2d_with_image_bitmap( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, format: u32, ty: u32, image: &ImageBitmap )
sourcepub unsafe fn tex_sub_image_2d_with_image_bitmap_and_width_and_height(
&self,
target: u32,
level: i32,
x_offset: i32,
y_offset: i32,
width: i32,
height: i32,
format: u32,
ty: u32,
image: &ImageBitmap
)
pub unsafe fn tex_sub_image_2d_with_image_bitmap_and_width_and_height( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, width: i32, height: i32, format: u32, ty: u32, image: &ImageBitmap )
WebGL2 Only
pub unsafe fn tex_sub_image_2d_with_html_canvas( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, format: u32, ty: u32, image: &HtmlCanvasElement )
sourcepub unsafe fn tex_sub_image_2d_with_html_canvas_and_width_and_height(
&self,
target: u32,
level: i32,
x_offset: i32,
y_offset: i32,
width: i32,
height: i32,
format: u32,
ty: u32,
image: &HtmlCanvasElement
)
pub unsafe fn tex_sub_image_2d_with_html_canvas_and_width_and_height( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, width: i32, height: i32, format: u32, ty: u32, image: &HtmlCanvasElement )
WebGL2 Only
pub unsafe fn tex_sub_image_2d_with_html_image( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, format: u32, ty: u32, image: &HtmlImageElement )
sourcepub unsafe fn tex_sub_image_2d_with_html_image_and_width_and_height(
&self,
target: u32,
level: i32,
x_offset: i32,
y_offset: i32,
width: i32,
height: i32,
format: u32,
ty: u32,
image: &HtmlImageElement
)
pub unsafe fn tex_sub_image_2d_with_html_image_and_width_and_height( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, width: i32, height: i32, format: u32, ty: u32, image: &HtmlImageElement )
WebGL2 Only
pub unsafe fn tex_sub_image_2d_with_html_video( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, format: u32, ty: u32, image: &HtmlVideoElement )
sourcepub unsafe fn tex_sub_image_2d_with_html_video_and_width_and_height(
&self,
target: u32,
level: i32,
x_offset: i32,
y_offset: i32,
width: i32,
height: i32,
format: u32,
ty: u32,
image: &HtmlVideoElement
)
pub unsafe fn tex_sub_image_2d_with_html_video_and_width_and_height( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, width: i32, height: i32, format: u32, ty: u32, image: &HtmlVideoElement )
WebGL2 Only
sourcepub unsafe fn tex_image_3d_with_image_bitmap(
&self,
target: u32,
level: i32,
internal_format: i32,
width: i32,
height: i32,
depth: i32,
border: i32,
format: u32,
ty: u32,
image: &ImageBitmap
)
pub unsafe fn tex_image_3d_with_image_bitmap( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, depth: i32, border: i32, format: u32, ty: u32, image: &ImageBitmap )
WebGL2 Only
sourcepub unsafe fn tex_image_3d_with_html_canvas_element(
&self,
target: u32,
level: i32,
internal_format: i32,
width: i32,
height: i32,
depth: i32,
border: i32,
format: u32,
ty: u32,
image: &HtmlCanvasElement
)
pub unsafe fn tex_image_3d_with_html_canvas_element( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, depth: i32, border: i32, format: u32, ty: u32, image: &HtmlCanvasElement )
WebGL2 Only
sourcepub unsafe fn tex_image_3d_with_html_image_element(
&self,
target: u32,
level: i32,
internal_format: i32,
width: i32,
height: i32,
depth: i32,
border: i32,
format: u32,
ty: u32,
image: &HtmlImageElement
)
pub unsafe fn tex_image_3d_with_html_image_element( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, depth: i32, border: i32, format: u32, ty: u32, image: &HtmlImageElement )
WebGL2 Only
sourcepub unsafe fn tex_image_3d_with_html_video_element(
&self,
target: u32,
level: i32,
internal_format: i32,
width: i32,
height: i32,
depth: i32,
border: i32,
format: u32,
ty: u32,
image: &HtmlVideoElement
)
pub unsafe fn tex_image_3d_with_html_video_element( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, depth: i32, border: i32, format: u32, ty: u32, image: &HtmlVideoElement )
WebGL2 Only
sourcepub unsafe fn tex_sub_image_3d_with_image_bitmap(
&self,
target: u32,
level: i32,
x_offset: i32,
y_offset: i32,
z_offset: i32,
width: i32,
height: i32,
depth: i32,
format: u32,
ty: u32,
image: &ImageBitmap
)
pub unsafe fn tex_sub_image_3d_with_image_bitmap( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, width: i32, height: i32, depth: i32, format: u32, ty: u32, image: &ImageBitmap )
WebGL2 Only
sourcepub unsafe fn tex_sub_image_3d_with_html_canvas_element(
&self,
target: u32,
level: i32,
x_offset: i32,
y_offset: i32,
z_offset: i32,
width: i32,
height: i32,
depth: i32,
format: u32,
ty: u32,
image: &HtmlCanvasElement
)
pub unsafe fn tex_sub_image_3d_with_html_canvas_element( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, width: i32, height: i32, depth: i32, format: u32, ty: u32, image: &HtmlCanvasElement )
WebGL2 Only
sourcepub unsafe fn tex_sub_image_3d_with_html_image_element(
&self,
target: u32,
level: i32,
x_offset: i32,
y_offset: i32,
z_offset: i32,
width: i32,
height: i32,
depth: i32,
format: u32,
ty: u32,
image: &HtmlImageElement
)
pub unsafe fn tex_sub_image_3d_with_html_image_element( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, width: i32, height: i32, depth: i32, format: u32, ty: u32, image: &HtmlImageElement )
WebGL2 Only
sourcepub unsafe fn tex_sub_image_3d_with_html_video_element(
&self,
target: u32,
level: i32,
x_offset: i32,
y_offset: i32,
z_offset: i32,
width: i32,
height: i32,
depth: i32,
format: u32,
ty: u32,
image: &HtmlVideoElement
)
pub unsafe fn tex_sub_image_3d_with_html_video_element( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, width: i32, height: i32, depth: i32, format: u32, ty: u32, image: &HtmlVideoElement )
WebGL2 Only
pub unsafe fn framebuffer_texture_multiview_ovr( &self, target: u32, attachment: u32, texture: Option<<Self as HasContext>::Texture>, level: i32, base_view_index: i32, num_views: i32 )
pub unsafe fn bind_external_framebuffer( &self, target: u32, framebuffer: &WebGlFramebuffer )
pub fn compressed_texture_astc_supports_ldr_profile(&self) -> bool
pub fn compressed_texture_astc_supports_hdr_profile(&self) -> bool
sourcepub fn lose_context(&self)
pub fn lose_context(&self)
Simulate losing WebGL rendering context. Only works when “WEBGL_lose_context” extension is available.
sourcepub fn restore_context(&self)
pub fn restore_context(&self)
Simulate restoring WebGL rendering context. Only works when “WEBGL_lose_context” extension is available. This will panic when the context is not lost.
Trait Implementations§
source§impl HasContext for Context
impl HasContext for Context
type Shader = WebShaderKey
type Program = WebProgramKey
type Buffer = WebBufferKey
type VertexArray = WebVertexArrayKey
type Texture = WebTextureKey
type Sampler = WebSamplerKey
type Fence = WebFenceKey
type Framebuffer = WebFramebufferKey
type Renderbuffer = WebRenderbufferKey
type Query = WebQueryKey
type UniformLocation = WebGlUniformLocation
type TransformFeedback = WebTransformFeedbackKey
fn supported_extensions(&self) -> &HashSet<String>
fn supports_debug(&self) -> bool
fn version(&self) -> &Version
unsafe fn create_framebuffer(&self) -> Result<Self::Framebuffer, String>
unsafe fn is_framebuffer(&self, framebuffer: Self::Framebuffer) -> bool
unsafe fn create_query(&self) -> Result<Self::Query, String>
unsafe fn create_renderbuffer(&self) -> Result<Self::Renderbuffer, String>
unsafe fn is_renderbuffer(&self, renderbuffer: Self::Renderbuffer) -> bool
unsafe fn create_sampler(&self) -> Result<Self::Sampler, String>
unsafe fn create_shader(&self, shader_type: u32) -> Result<Self::Shader, String>
unsafe fn is_shader(&self, shader: Self::Shader) -> bool
unsafe fn create_texture(&self) -> Result<Self::Texture, String>
unsafe fn create_named_texture( &self, _target: u32 ) -> Result<Self::Texture, String>
unsafe fn is_texture(&self, texture: Self::Texture) -> bool
unsafe fn delete_shader(&self, shader: Self::Shader)
unsafe fn shader_source(&self, shader: Self::Shader, source: &str)
unsafe fn compile_shader(&self, shader: Self::Shader)
unsafe fn get_shader_completion_status(&self, shader: Self::Shader) -> bool
unsafe fn get_shader_compile_status(&self, shader: Self::Shader) -> bool
unsafe fn get_shader_info_log(&self, shader: Self::Shader) -> String
unsafe fn get_tex_image( &self, _target: u32, _level: i32, _format: u32, _ty: u32, _pixels: PixelPackData<'_> )
unsafe fn create_program(&self) -> Result<Self::Program, String>
unsafe fn is_program(&self, program: Self::Program) -> bool
unsafe fn delete_program(&self, program: Self::Program)
unsafe fn attach_shader(&self, program: Self::Program, shader: Self::Shader)
unsafe fn detach_shader(&self, program: Self::Program, shader: Self::Shader)
unsafe fn link_program(&self, program: Self::Program)
unsafe fn get_program_completion_status(&self, program: Self::Program) -> bool
unsafe fn get_program_link_status(&self, program: Self::Program) -> bool
unsafe fn get_program_info_log(&self, program: Self::Program) -> String
unsafe fn get_program_resource_i32( &self, _program: Self::Program, _interface: u32, _index: u32, _properties: &[u32] ) -> Vec<i32>
unsafe fn get_active_uniforms(&self, program: Self::Program) -> u32
unsafe fn get_active_uniform( &self, program: Self::Program, index: u32 ) -> Option<ActiveUniform>
unsafe fn use_program(&self, program: Option<Self::Program>)
unsafe fn create_buffer(&self) -> Result<Self::Buffer, String>
unsafe fn create_named_buffer(&self) -> Result<Self::Buffer, String>
unsafe fn is_buffer(&self, buffer: Self::Buffer) -> bool
unsafe fn bind_buffer(&self, target: u32, buffer: Option<Self::Buffer>)
unsafe fn bind_buffer_base( &self, target: u32, index: u32, buffer: Option<Self::Buffer> )
unsafe fn bind_buffer_range( &self, target: u32, index: u32, buffer: Option<Self::Buffer>, offset: i32, size: i32 )
unsafe fn bind_vertex_buffer( &self, _binding_index: u32, _buffer: Option<Buffer>, _offset: i32, _stride: i32 )
unsafe fn bind_framebuffer( &self, target: u32, framebuffer: Option<Self::Framebuffer> )
unsafe fn bind_renderbuffer( &self, target: u32, renderbuffer: Option<Self::Renderbuffer> )
unsafe fn blit_framebuffer( &self, src_x0: i32, src_y0: i32, src_x1: i32, src_y1: i32, dst_x0: i32, dst_y0: i32, dst_x1: i32, dst_y1: i32, mask: u32, filter: u32 )
unsafe fn create_vertex_array(&self) -> Result<Self::VertexArray, String>
unsafe fn delete_vertex_array(&self, vertex_array: Self::VertexArray)
unsafe fn bind_vertex_array(&self, vertex_array: Option<Self::VertexArray>)
unsafe fn clear_color(&self, red: f32, green: f32, blue: f32, alpha: f32)
unsafe fn supports_f64_precision() -> bool
unsafe fn clear_depth_f64(&self, _depth: f64)
unsafe fn clear_depth_f32(&self, depth: f32)
unsafe fn clear_stencil(&self, stencil: i32)
unsafe fn clear(&self, mask: u32)
unsafe fn patch_parameter_i32(&self, _parameter: u32, _value: i32)
unsafe fn pixel_store_i32(&self, parameter: u32, value: i32)
unsafe fn pixel_store_bool(&self, parameter: u32, value: bool)
unsafe fn bind_frag_data_location( &self, _program: Self::Program, _color_number: u32, _name: &str )
unsafe fn buffer_data_size(&self, target: u32, size: i32, usage: u32)
unsafe fn buffer_data_u8_slice(&self, target: u32, data: &[u8], usage: u32)
unsafe fn named_buffer_data_u8_slice( &self, _buffer: Self::Buffer, _data: &[u8], _usage: u32 )
unsafe fn buffer_sub_data_u8_slice( &self, target: u32, offset: i32, src_data: &[u8] )
unsafe fn get_buffer_sub_data( &self, target: u32, offset: i32, dst_data: &mut [u8] )
unsafe fn buffer_storage( &self, _target: u32, _size: i32, _data: Option<&[u8]>, _flags: u32 )
unsafe fn check_framebuffer_status(&self, target: u32) -> u32
unsafe fn clear_buffer_i32_slice( &self, target: u32, draw_buffer: u32, values: &[i32] )
unsafe fn clear_buffer_u32_slice( &self, target: u32, draw_buffer: u32, values: &[u32] )
unsafe fn clear_buffer_f32_slice( &self, target: u32, draw_buffer: u32, values: &[f32] )
unsafe fn clear_buffer_depth_stencil( &self, target: u32, draw_buffer: u32, depth: f32, stencil: i32 )
unsafe fn client_wait_sync( &self, fence: Self::Fence, flags: u32, timeout: i32 ) -> u32
unsafe fn wait_sync(&self, fence: Self::Fence, flags: u32, timeout: u64)
unsafe fn copy_buffer_sub_data( &self, src_target: u32, dst_target: u32, src_offset: i32, dst_offset: i32, size: i32 )
unsafe fn copy_image_sub_data( &self, _src_name: Self::Texture, _src_target: u32, _src_level: i32, _src_x: i32, _src_y: i32, _src_z: i32, _dst_name: Self::Texture, _dst_target: u32, _dst_level: i32, _dst_x: i32, _dst_y: i32, _dst_z: i32, _src_width: i32, _src_height: i32, _src_depth: i32 )
unsafe fn copy_tex_image_2d( &self, target: u32, level: i32, internal_format: u32, x: i32, y: i32, width: i32, height: i32, border: i32 )
unsafe fn copy_tex_sub_image_2d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, x: i32, y: i32, width: i32, height: i32 )
unsafe fn copy_tex_sub_image_3d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, x: i32, y: i32, width: i32, height: i32 )
unsafe fn delete_buffer(&self, buffer: Self::Buffer)
unsafe fn delete_framebuffer(&self, framebuffer: Self::Framebuffer)
unsafe fn delete_query(&self, query: Self::Query)
unsafe fn delete_renderbuffer(&self, renderbuffer: Self::Renderbuffer)
unsafe fn delete_sampler(&self, sampler: Self::Sampler)
unsafe fn delete_sync(&self, fence: Self::Fence)
unsafe fn delete_texture(&self, texture: Self::Texture)
unsafe fn disable(&self, parameter: u32)
unsafe fn disable_draw_buffer(&self, _parameter: u32, _draw_buffer: u32)
unsafe fn disable_vertex_attrib_array(&self, index: u32)
unsafe fn dispatch_compute( &self, _groups_x: u32, _groups_y: u32, _groups_z: u32 )
unsafe fn dispatch_compute_indirect(&self, _offset: i32)
unsafe fn draw_arrays(&self, mode: u32, first: i32, count: i32)
unsafe fn draw_arrays_instanced( &self, mode: u32, first: i32, count: i32, instance_count: i32 )
unsafe fn draw_arrays_instanced_base_instance( &self, _mode: u32, _first: i32, _count: i32, _instance_count: i32, _base_instance: u32 )
unsafe fn draw_arrays_indirect_offset(&self, _mode: u32, _offset: i32)
unsafe fn draw_buffer(&self, draw_buffer: u32)
unsafe fn draw_buffers(&self, buffers: &[u32])
unsafe fn draw_elements( &self, mode: u32, count: i32, element_type: u32, offset: i32 )
unsafe fn draw_elements_base_vertex( &self, _mode: u32, _count: i32, _element_type: u32, _offset: i32, _base_vertex: i32 )
unsafe fn draw_elements_instanced( &self, mode: u32, count: i32, element_type: u32, offset: i32, instance_count: i32 )
unsafe fn draw_elements_instanced_base_vertex( &self, _mode: u32, _count: i32, _element_type: u32, _offset: i32, _instance_count: i32, _base_vertex: i32 )
unsafe fn draw_elements_instanced_base_vertex_base_instance( &self, _mode: u32, _count: i32, _element_type: u32, _offset: i32, _instance_count: i32, _base_vertex: i32, _base_instance: u32 )
unsafe fn draw_elements_indirect_offset( &self, _mode: u32, _element_type: u32, _offset: i32 )
unsafe fn enable(&self, parameter: u32)
unsafe fn is_enabled(&self, parameter: u32) -> bool
unsafe fn enable_draw_buffer(&self, _parameter: u32, _draw_buffer: u32)
unsafe fn enable_vertex_array_attrib( &self, _vao: Self::VertexArray, _index: u32 )
unsafe fn enable_vertex_attrib_array(&self, index: u32)
unsafe fn flush(&self)
unsafe fn framebuffer_renderbuffer( &self, target: u32, attachment: u32, renderbuffer_target: u32, renderbuffer: Option<Self::Renderbuffer> )
unsafe fn framebuffer_texture( &self, _target: u32, _attachment: u32, _texture: Option<Self::Texture>, _level: i32 )
unsafe fn framebuffer_texture_2d( &self, target: u32, attachment: u32, texture_target: u32, texture: Option<Self::Texture>, level: i32 )
unsafe fn framebuffer_texture_3d( &self, _target: u32, _attachment: u32, _texture_target: u32, _texture: Option<Self::Texture>, _level: i32, _layer: i32 )
unsafe fn framebuffer_texture_layer( &self, target: u32, attachment: u32, texture: Option<Self::Texture>, level: i32, layer: i32 )
unsafe fn front_face(&self, value: u32)
unsafe fn get_error(&self) -> u32
unsafe fn get_tex_parameter_i32(&self, target: u32, parameter: u32) -> i32
unsafe fn get_buffer_parameter_i32(&self, target: u32, parameter: u32) -> i32
unsafe fn get_parameter_i32(&self, parameter: u32) -> i32
unsafe fn get_parameter_i32_slice(&self, parameter: u32, v: &mut [i32])
unsafe fn get_parameter_f32(&self, parameter: u32) -> f32
unsafe fn get_parameter_f32_slice(&self, parameter: u32, v: &mut [f32])
unsafe fn get_parameter_indexed_i32(&self, parameter: u32, index: u32) -> i32
unsafe fn get_parameter_indexed_string( &self, parameter: u32, index: u32 ) -> String
unsafe fn get_parameter_string(&self, parameter: u32) -> String
unsafe fn get_uniform_location( &self, program: Self::Program, name: &str ) -> Option<Self::UniformLocation>
unsafe fn get_attrib_location( &self, program: Self::Program, name: &str ) -> Option<u32>
unsafe fn bind_attrib_location( &self, program: Self::Program, index: u32, name: &str )
unsafe fn get_active_attributes(&self, program: Self::Program) -> u32
unsafe fn get_active_attribute( &self, program: Self::Program, index: u32 ) -> Option<ActiveAttribute>
unsafe fn get_sync_status(&self, fence: Self::Fence) -> u32
unsafe fn is_sync(&self, fence: Self::Fence) -> bool
unsafe fn renderbuffer_storage( &self, target: u32, internal_format: u32, width: i32, height: i32 )
unsafe fn renderbuffer_storage_multisample( &self, target: u32, samples: i32, internal_format: u32, width: i32, height: i32 )
unsafe fn sampler_parameter_f32( &self, sampler: Self::Sampler, name: u32, value: f32 )
unsafe fn sampler_parameter_f32_slice( &self, _sampler: Self::Sampler, _name: u32, _value: &[f32] )
unsafe fn sampler_parameter_i32( &self, sampler: Self::Sampler, name: u32, value: i32 )
unsafe fn generate_mipmap(&self, target: u32)
unsafe fn generate_texture_mipmap(&self, _texture: Self::Texture)
unsafe fn tex_image_1d( &self, _target: u32, _level: i32, _internal_format: i32, _width: i32, _border: i32, _format: u32, _ty: u32, _pixels: Option<&[u8]> )
unsafe fn compressed_tex_image_1d( &self, _target: u32, _level: i32, _internal_format: i32, _width: i32, _border: i32, _image_size: i32, _pixels: &[u8] )
unsafe fn tex_image_2d( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, border: i32, format: u32, ty: u32, pixels: Option<&[u8]> )
unsafe fn tex_image_2d_multisample( &self, _target: u32, _samples: i32, _internal_format: i32, _width: i32, _height: i32, _fixed_sample_locations: bool )
unsafe fn compressed_tex_image_2d( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, border: i32, _image_size: i32, pixels: &[u8] )
unsafe fn tex_image_3d( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, depth: i32, border: i32, format: u32, ty: u32, pixels: Option<&[u8]> )
unsafe fn compressed_tex_image_3d( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, depth: i32, border: i32, _image_size: i32, pixels: &[u8] )
unsafe fn tex_storage_1d( &self, _target: u32, _levels: i32, _internal_format: u32, _width: i32 )
unsafe fn tex_storage_2d( &self, target: u32, levels: i32, internal_format: u32, width: i32, height: i32 )
unsafe fn tex_storage_2d_multisample( &self, _target: u32, _samples: i32, _internal_format: u32, _width: i32, _height: i32, _fixed_sample_locations: bool )
unsafe fn tex_storage_3d( &self, target: u32, levels: i32, internal_format: u32, width: i32, height: i32, depth: i32 )
unsafe fn uniform_1_i32( &self, uniform_location: Option<&Self::UniformLocation>, x: i32 )
unsafe fn uniform_2_i32( &self, uniform_location: Option<&Self::UniformLocation>, x: i32, y: i32 )
unsafe fn uniform_3_i32( &self, uniform_location: Option<&Self::UniformLocation>, x: i32, y: i32, z: i32 )
unsafe fn uniform_4_i32( &self, uniform_location: Option<&Self::UniformLocation>, x: i32, y: i32, z: i32, w: i32 )
unsafe fn uniform_1_i32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[i32] )
unsafe fn uniform_2_i32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[i32] )
unsafe fn uniform_3_i32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[i32] )
unsafe fn uniform_4_i32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[i32] )
unsafe fn uniform_1_u32( &self, uniform_location: Option<&Self::UniformLocation>, x: u32 )
unsafe fn uniform_2_u32( &self, uniform_location: Option<&Self::UniformLocation>, x: u32, y: u32 )
unsafe fn uniform_3_u32( &self, uniform_location: Option<&Self::UniformLocation>, x: u32, y: u32, z: u32 )
unsafe fn uniform_4_u32( &self, uniform_location: Option<&Self::UniformLocation>, x: u32, y: u32, z: u32, w: u32 )
unsafe fn uniform_1_u32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[u32] )
unsafe fn uniform_2_u32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[u32] )
unsafe fn uniform_3_u32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[u32] )
unsafe fn uniform_4_u32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[u32] )
unsafe fn uniform_1_f32( &self, uniform_location: Option<&Self::UniformLocation>, x: f32 )
unsafe fn uniform_2_f32( &self, uniform_location: Option<&Self::UniformLocation>, x: f32, y: f32 )
unsafe fn uniform_3_f32( &self, uniform_location: Option<&Self::UniformLocation>, x: f32, y: f32, z: f32 )
unsafe fn uniform_4_f32( &self, uniform_location: Option<&Self::UniformLocation>, x: f32, y: f32, z: f32, w: f32 )
unsafe fn uniform_1_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[f32] )
unsafe fn uniform_2_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[f32] )
unsafe fn uniform_3_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[f32] )
unsafe fn uniform_4_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, v: &[f32] )
unsafe fn uniform_matrix_2_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, transpose: bool, v: &[f32] )
unsafe fn uniform_matrix_2x3_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, transpose: bool, v: &[f32] )
unsafe fn uniform_matrix_2x4_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, transpose: bool, v: &[f32] )
unsafe fn uniform_matrix_3x2_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, transpose: bool, v: &[f32] )
unsafe fn uniform_matrix_3_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, transpose: bool, v: &[f32] )
unsafe fn uniform_matrix_3x4_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, transpose: bool, v: &[f32] )
unsafe fn uniform_matrix_4x2_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, transpose: bool, v: &[f32] )
unsafe fn uniform_matrix_4x3_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, transpose: bool, v: &[f32] )
unsafe fn uniform_matrix_4_f32_slice( &self, uniform_location: Option<&Self::UniformLocation>, transpose: bool, v: &[f32] )
unsafe fn unmap_buffer(&self, _target: u32)
unsafe fn cull_face(&self, value: u32)
unsafe fn color_mask(&self, red: bool, green: bool, blue: bool, alpha: bool)
unsafe fn color_mask_draw_buffer( &self, _draw_buffer: u32, _red: bool, _green: bool, _blue: bool, _alpha: bool )
unsafe fn depth_mask(&self, value: bool)
unsafe fn blend_color(&self, red: f32, green: f32, blue: f32, alpha: f32)
unsafe fn line_width(&self, width: f32)
unsafe fn map_buffer_range( &self, _target: u32, _offset: i32, _length: i32, _access: u32 ) -> *mut u8
unsafe fn flush_mapped_buffer_range( &self, _target: u32, _offset: i32, _length: i32 )
unsafe fn invalidate_buffer_sub_data( &self, _target: u32, _offset: i32, _length: i32 )
unsafe fn invalidate_framebuffer(&self, target: u32, attachments: &[u32])
unsafe fn polygon_offset(&self, factor: f32, units: f32)
unsafe fn polygon_mode(&self, _face: u32, mode: u32)
unsafe fn finish(&self)
unsafe fn bind_texture(&self, target: u32, texture: Option<Self::Texture>)
unsafe fn bind_sampler(&self, unit: u32, sampler: Option<Self::Sampler>)
unsafe fn active_texture(&self, unit: u32)
unsafe fn fence_sync( &self, condition: u32, flags: u32 ) -> Result<Self::Fence, String>
unsafe fn tex_parameter_f32(&self, target: u32, parameter: u32, value: f32)
unsafe fn tex_parameter_i32(&self, target: u32, parameter: u32, value: i32)
unsafe fn texture_parameter_i32( &self, _texture: Self::Texture, _parameter: u32, _value: i32 )
unsafe fn tex_parameter_f32_slice( &self, _target: u32, _parameter: u32, _values: &[f32] )
unsafe fn tex_parameter_i32_slice( &self, _target: u32, _parameter: u32, _values: &[i32] )
unsafe fn tex_sub_image_2d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, width: i32, height: i32, format: u32, ty: u32, pixels: PixelUnpackData<'_> )
unsafe fn texture_sub_image_3d( &self, _texture: Self::Texture, _level: i32, _x_offset: i32, _y_offset: i32, _z_offset: i32, _width: i32, _height: i32, _depth: i32, _format: u32, _ty: u32, _pixels: PixelUnpackData<'_> )
unsafe fn compressed_tex_sub_image_2d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, width: i32, height: i32, format: u32, pixels: CompressedPixelUnpackData<'_> )
unsafe fn tex_sub_image_3d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, width: i32, height: i32, depth: i32, format: u32, ty: u32, pixels: PixelUnpackData<'_> )
unsafe fn compressed_tex_sub_image_3d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, width: i32, height: i32, depth: i32, format: u32, pixels: CompressedPixelUnpackData<'_> )
unsafe fn depth_func(&self, func: u32)
unsafe fn depth_range_f32(&self, near: f32, far: f32)
unsafe fn depth_range_f64(&self, _near: f64, _far: f64)
unsafe fn depth_range_f64_slice( &self, _first: u32, _count: i32, _values: &[[f64; 2]] )
unsafe fn scissor(&self, x: i32, y: i32, width: i32, height: i32)
unsafe fn scissor_slice(&self, _first: u32, _count: i32, _scissors: &[[i32; 4]])
unsafe fn vertex_array_attrib_binding_f32( &self, _vao: Self::VertexArray, _index: u32, _binding_index: u32 )
unsafe fn vertex_array_attrib_format_f32( &self, _vao: Self::VertexArray, _index: u32, _size: i32, _data_type: u32, _normalized: bool, _relative_offset: u32 )
unsafe fn vertex_array_attrib_format_i32( &self, _vao: Self::VertexArray, _index: u32, _size: i32, _data_type: u32, _relative_offset: u32 )
unsafe fn vertex_array_element_buffer( &self, _vao: Self::VertexArray, _buffer: Option<Self::Buffer> )
unsafe fn vertex_array_vertex_buffer( &self, _vao: Self::VertexArray, _binding_index: u32, _buffer: Option<Self::Buffer>, _offset: i32, _stride: i32 )
unsafe fn vertex_attrib_divisor(&self, index: u32, divisor: u32)
unsafe fn vertex_attrib_pointer_f32( &self, index: u32, size: i32, data_type: u32, normalized: bool, stride: i32, offset: i32 )
unsafe fn vertex_attrib_pointer_i32( &self, index: u32, size: i32, data_type: u32, stride: i32, offset: i32 )
unsafe fn vertex_attrib_pointer_f64( &self, _index: u32, _size: i32, _data_type: u32, _stride: i32, _offset: i32 )
unsafe fn vertex_attrib_format_f32( &self, _index: u32, _size: i32, _data_type: u32, _normalized: bool, _relative_offset: u32 )
unsafe fn vertex_attrib_format_i32( &self, _index: u32, _size: i32, _data_type: u32, _relative_offset: u32 )
unsafe fn vertex_attrib_1_f32(&self, index: u32, x: f32)
unsafe fn vertex_attrib_2_f32(&self, index: u32, x: f32, y: f32)
unsafe fn vertex_attrib_3_f32(&self, index: u32, x: f32, y: f32, z: f32)
unsafe fn vertex_attrib_4_f32(&self, index: u32, x: f32, y: f32, z: f32, w: f32)
unsafe fn vertex_attrib_1_f32_slice(&self, index: u32, v: &[f32])
unsafe fn vertex_attrib_2_f32_slice(&self, index: u32, v: &[f32])
unsafe fn vertex_attrib_3_f32_slice(&self, index: u32, v: &[f32])
unsafe fn vertex_attrib_4_f32_slice(&self, index: u32, v: &[f32])
unsafe fn vertex_attrib_binding(&self, _attrib_index: u32, _binding_index: u32)
unsafe fn vertex_binding_divisor(&self, _binding_index: u32, _divisor: u32)
unsafe fn viewport(&self, x: i32, y: i32, width: i32, height: i32)
unsafe fn viewport_f32_slice( &self, _first: u32, _count: i32, _values: &[[f32; 4]] )
unsafe fn blend_func(&self, src: u32, dst: u32)
unsafe fn blend_func_draw_buffer(&self, _draw_buffer: u32, _src: u32, _dst: u32)
unsafe fn blend_func_separate( &self, src_rgb: u32, dst_rgb: u32, src_alpha: u32, dst_alpha: u32 )
unsafe fn blend_func_separate_draw_buffer( &self, _draw_buffer: u32, _src_rgb: u32, _dst_rgb: u32, _src_alpha: u32, _dst_alpha: u32 )
unsafe fn blend_equation(&self, mode: u32)
unsafe fn blend_equation_draw_buffer(&self, _draw_buffer: u32, _mode: u32)
unsafe fn blend_equation_separate(&self, mode_rgb: u32, mode_alpha: u32)
unsafe fn blend_equation_separate_draw_buffer( &self, _draw_buffer: u32, _mode_rgb: u32, _mode_alpha: u32 )
unsafe fn stencil_func(&self, func: u32, reference: i32, mask: u32)
unsafe fn stencil_func_separate( &self, face: u32, func: u32, reference: i32, mask: u32 )
unsafe fn stencil_mask(&self, mask: u32)
unsafe fn stencil_mask_separate(&self, face: u32, mask: u32)
unsafe fn stencil_op(&self, stencil_fail: u32, depth_fail: u32, pass: u32)
unsafe fn stencil_op_separate( &self, face: u32, stencil_fail: u32, depth_fail: u32, pass: u32 )
unsafe fn debug_message_control( &self, _source: u32, _msg_type: u32, _severity: u32, _ids: &[u32], _enabled: bool )
unsafe fn debug_message_insert<S>( &self, _source: u32, _msg_type: u32, _id: u32, _severity: u32, _msg: S )
unsafe fn debug_message_callback<F>(&mut self, callback: F)
unsafe fn get_debug_message_log(&self, _count: u32) -> Vec<DebugMessageLogEntry>
unsafe fn push_debug_group<S>(&self, _source: u32, _id: u32, _message: S)
unsafe fn pop_debug_group(&self)
unsafe fn object_label<S>( &self, _identifier: u32, _name: u32, _label: Option<S> )
unsafe fn get_object_label(&self, _identifier: u32, _name: u32) -> String
unsafe fn object_ptr_label<S>(&self, _sync: Self::Fence, _label: Option<S>)
unsafe fn get_object_ptr_label(&self, _sync: Self::Fence) -> String
unsafe fn get_uniform_block_index( &self, program: Self::Program, name: &str ) -> Option<u32>
unsafe fn uniform_block_binding( &self, program: Self::Program, index: u32, binding: u32 )
unsafe fn get_shader_storage_block_index( &self, _program: Self::Program, _name: &str ) -> Option<u32>
unsafe fn shader_storage_block_binding( &self, _program: Self::Program, _index: u32, _binding: u32 )
unsafe fn read_buffer(&self, src: u32)
unsafe fn read_pixels( &self, x: i32, y: i32, width: i32, height: i32, format: u32, gltype: u32, pixels: PixelPackData<'_> )
unsafe fn texture_storage_3d( &self, _texture: Self::Texture, _levels: i32, _internal_format: u32, _width: i32, _height: i32, _depth: i32 )
unsafe fn get_uniform_i32( &self, program: Self::Program, location: &Self::UniformLocation, v: &mut [i32] )
unsafe fn get_uniform_f32( &self, program: Self::Program, location: &Self::UniformLocation, v: &mut [f32] )
unsafe fn begin_query(&self, target: u32, query: Self::Query)
unsafe fn end_query(&self, target: u32)
unsafe fn query_counter(&self, query: Self::Query, target: u32)
unsafe fn get_query_parameter_u32( &self, query: Self::Query, parameter: u32 ) -> u32
unsafe fn get_query_parameter_u64_with_offset( &self, query: Self::Query, parameter: u32, offset: usize )
unsafe fn create_transform_feedback( &self ) -> Result<Self::TransformFeedback, String>
unsafe fn delete_transform_feedback( &self, transform_feedback: Self::TransformFeedback )
unsafe fn bind_transform_feedback( &self, target: u32, transform_feedback: Option<Self::TransformFeedback> )
unsafe fn begin_transform_feedback(&self, primitive_mode: u32)
unsafe fn end_transform_feedback(&self)
unsafe fn pause_transform_feedback(&self)
unsafe fn resume_transform_feedback(&self)
unsafe fn transform_feedback_varyings( &self, program: Self::Program, varyings: &[&str], buffer_mode: u32 )
unsafe fn get_transform_feedback_varying( &self, program: Self::Program, index: u32 ) -> Option<ActiveTransformFeedback>
unsafe fn memory_barrier(&self, _barriers: u32)
unsafe fn memory_barrier_by_region(&self, _barriers: u32)
unsafe fn bind_image_texture( &self, _unit: u32, _texture: Self::Texture, _level: i32, _layered: bool, _layer: i32, _access: u32, _format: u32 )
unsafe fn get_active_uniform_block_parameter_i32( &self, program: Self::Program, uniform_block_index: u32, parameter: u32 ) -> i32
unsafe fn get_active_uniform_block_parameter_i32_slice( &self, program: Self::Program, uniform_block_index: u32, parameter: u32, out: &mut [i32] )
unsafe fn get_active_uniform_block_name( &self, program: Self::Program, uniform_block_index: u32 ) -> String
unsafe fn max_shader_compiler_threads(&self, _count: u32)
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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