#[repr(C)]pub(crate) struct WebGLRenderingContext {Show 28 fields
reflector_: Reflector,
webgl_sender: WebGLMessageSender,
webrender_image: ImageKey,
webgl_version: WebGLVersion,
glsl_version: WebGLSLVersion,
limits: GLLimits,
canvas: HTMLCanvasElementOrOffscreenCanvas,
last_error: Cell<Option<WebGLError>>,
texture_packing_alignment: Cell<u8>,
texture_unpacking_settings: Cell<TextureUnpacking>,
texture_unpacking_alignment: Cell<u32>,
bound_draw_framebuffer: MutNullableDom<WebGLFramebuffer>,
bound_read_framebuffer: MutNullableDom<WebGLFramebuffer>,
bound_renderbuffer: MutNullableDom<WebGLRenderbuffer>,
bound_buffer_array: MutNullableDom<WebGLBuffer>,
current_program: MutNullableDom<WebGLProgram>,
current_vertex_attribs: DomRefCell<Box<[VertexAttrib]>>,
current_scissor: Cell<(i32, i32, u32, u32)>,
current_clear_color: Cell<(f32, f32, f32, f32)>,
size: Cell<Size2D<u32>>,
extension_manager: WebGLExtensions,
capabilities: Capabilities,
default_vao: DomOnceCell<WebGLVertexArrayObjectOES>,
current_vao: MutNullableDom<WebGLVertexArrayObjectOES>,
default_vao_webgl2: DomOnceCell<WebGLVertexArrayObject>,
current_vao_webgl2: MutNullableDom<WebGLVertexArrayObject>,
textures: Textures,
api_type: GlType,
}
Fields§
§reflector_: Reflector
§webgl_sender: WebGLMessageSender
§webrender_image: ImageKey
§webgl_version: WebGLVersion
§glsl_version: WebGLSLVersion
§limits: GLLimits
§canvas: HTMLCanvasElementOrOffscreenCanvas
§last_error: Cell<Option<WebGLError>>
§texture_packing_alignment: Cell<u8>
§texture_unpacking_settings: Cell<TextureUnpacking>
§texture_unpacking_alignment: Cell<u32>
§bound_draw_framebuffer: MutNullableDom<WebGLFramebuffer>
§bound_read_framebuffer: MutNullableDom<WebGLFramebuffer>
§bound_renderbuffer: MutNullableDom<WebGLRenderbuffer>
§bound_buffer_array: MutNullableDom<WebGLBuffer>
§current_program: MutNullableDom<WebGLProgram>
§current_vertex_attribs: DomRefCell<Box<[VertexAttrib]>>
§current_scissor: Cell<(i32, i32, u32, u32)>
§current_clear_color: Cell<(f32, f32, f32, f32)>
§size: Cell<Size2D<u32>>
§extension_manager: WebGLExtensions
§capabilities: Capabilities
§default_vao: DomOnceCell<WebGLVertexArrayObjectOES>
§current_vao: MutNullableDom<WebGLVertexArrayObjectOES>
§default_vao_webgl2: DomOnceCell<WebGLVertexArrayObject>
§current_vao_webgl2: MutNullableDom<WebGLVertexArrayObject>
§textures: Textures
§api_type: GlType
Implementations§
source§impl WebGLRenderingContext
impl WebGLRenderingContext
fn __assert_parent_type(&self)
source§impl WebGLRenderingContext
impl WebGLRenderingContext
pub(crate) fn new_inherited( window: &Window, canvas: &HTMLCanvasElementOrOffscreenCanvas, webgl_version: WebGLVersion, size: Size2D<u32>, attrs: GLContextAttributes, ) -> Result<WebGLRenderingContext, String>
pub(crate) fn new( window: &Window, canvas: &HTMLCanvasElementOrOffscreenCanvas, webgl_version: WebGLVersion, size: Size2D<u32>, attrs: GLContextAttributes, can_gc: CanGc, ) -> Option<Root<Dom<WebGLRenderingContext>>>
pub(crate) fn webgl_version(&self) -> WebGLVersion
pub(crate) fn limits(&self) -> &GLLimits
pub(crate) fn texture_unpacking_alignment(&self) -> u32
pub(crate) fn current_vao(&self) -> Root<Dom<WebGLVertexArrayObjectOES>>
pub(crate) fn current_vao_webgl2(&self) -> Root<Dom<WebGLVertexArrayObject>>
pub(crate) fn current_vertex_attribs(&self) -> RefMut<'_, Box<[VertexAttrib]>>
pub(crate) fn recreate(&self, size: Size2D<u32>)
pub(crate) fn context_id(&self) -> WebGLContextId
pub(crate) fn onscreen(&self) -> bool
pub(crate) fn send_command(&self, command: WebGLCommand)
pub(crate) fn send_command_ignored(&self, command: WebGLCommand)
pub(crate) fn webgl_error(&self, err: WebGLError)
pub(crate) fn validate_framebuffer(&self) -> WebGLResult<()>
pub(crate) fn validate_ownership<T>(&self, object: &T) -> WebGLResult<()>where
T: DerivedFrom<WebGLObject>,
pub(crate) fn with_location<F>( &self, location: Option<&WebGLUniformLocation>, f: F, )
pub(crate) fn textures(&self) -> &Textures
fn tex_parameter(&self, target: u32, param: u32, value: TexParameterValue)
pub(crate) fn mark_as_dirty(&self)
fn vertex_attrib(&self, indx: u32, x: f32, y: f32, z: f32, w: f32)
pub(crate) fn get_current_framebuffer_size(&self) -> Option<(i32, i32)>
pub(crate) fn get_texture_packing_alignment(&self) -> u8
fn validate_filterable_texture( &self, texture: &WebGLTexture, target: TexImageTarget, level: u32, internal_format: TexFormat, size: Size2D<u32>, data_type: TexDataType, ) -> bool
fn validate_stencil_actions(&self, action: u32) -> bool
pub(crate) fn get_image_pixels( &self, source: TexImageSource, ) -> Result<Option<TexPixels>, Error>
pub(crate) fn validate_tex_image_2d_data( &self, width: u32, height: u32, format: TexFormat, data_type: TexDataType, unpacking_alignment: u32, data: Option<&ArrayBufferView>, ) -> Result<u32, ()>
pub(crate) fn tex_image_2d( &self, texture: &WebGLTexture, target: TexImageTarget, data_type: TexDataType, internal_format: TexFormat, format: TexFormat, level: u32, _border: u32, unpacking_alignment: u32, size: Size2D<u32>, source: TexSource, )
fn tex_sub_image_2d( &self, texture: Root<Dom<WebGLTexture>>, target: TexImageTarget, level: u32, xoffset: i32, yoffset: i32, format: TexFormat, data_type: TexDataType, unpacking_alignment: u32, pixels: TexPixels, )
fn get_gl_extensions(&self) -> String
pub(crate) fn layout_handle(&self) -> HTMLCanvasDataSource
pub(crate) fn draw_arrays_instanced( &self, mode: u32, first: i32, count: i32, primcount: i32, ) -> WebGLResult<()>
pub(crate) fn draw_elements_instanced( &self, mode: u32, count: i32, type_: u32, offset: i64, primcount: i32, ) -> WebGLResult<()>
pub(crate) fn vertex_attrib_divisor(&self, index: u32, divisor: u32)
pub(crate) fn get_image_data(&self, size: Size2D<u32>) -> Option<Vec<u8>>
pub(crate) fn array_buffer(&self) -> Option<Root<Dom<WebGLBuffer>>>
pub(crate) fn array_buffer_slot(&self) -> &MutNullableDom<WebGLBuffer>
pub(crate) fn bound_buffer( &self, target: u32, ) -> WebGLResult<Option<Root<Dom<WebGLBuffer>>>>
pub(crate) fn buffer_usage(&self, usage: u32) -> WebGLResult<u32>
pub(crate) fn create_vertex_array( &self, ) -> Option<Root<Dom<WebGLVertexArrayObjectOES>>>
pub(crate) fn create_vertex_array_webgl2( &self, ) -> Option<Root<Dom<WebGLVertexArrayObject>>>
pub(crate) fn delete_vertex_array( &self, vao: Option<&WebGLVertexArrayObjectOES>, )
pub(crate) fn delete_vertex_array_webgl2( &self, vao: Option<&WebGLVertexArrayObject>, )
pub(crate) fn is_vertex_array( &self, vao: Option<&WebGLVertexArrayObjectOES>, ) -> bool
pub(crate) fn is_vertex_array_webgl2( &self, vao: Option<&WebGLVertexArrayObject>, ) -> bool
pub(crate) fn bind_vertex_array(&self, vao: Option<&WebGLVertexArrayObjectOES>)
pub(crate) fn bind_vertex_array_webgl2( &self, vao: Option<&WebGLVertexArrayObject>, )
fn validate_blend_mode(&self, mode: u32) -> WebGLResult<()>
pub(crate) fn initialize_framebuffer(&self, clear_bits: u32)
pub(crate) fn extension_manager(&self) -> &WebGLExtensions
pub(crate) fn buffer_data( &self, target: u32, data: Option<ArrayBufferViewOrArrayBuffer>, usage: u32, bound_buffer: Option<Root<Dom<WebGLBuffer>>>, )
pub(crate) fn buffer_data_( &self, target: u32, size: i64, usage: u32, bound_buffer: Option<Root<Dom<WebGLBuffer>>>, )
pub(crate) fn buffer_sub_data( &self, target: u32, offset: i64, data: ArrayBufferViewOrArrayBuffer, bound_buffer: Option<Root<Dom<WebGLBuffer>>>, )
pub(crate) fn bind_buffer_maybe( &self, slot: &MutNullableDom<WebGLBuffer>, target: u32, buffer: Option<&WebGLBuffer>, )
pub(crate) fn current_program(&self) -> Option<Root<Dom<WebGLProgram>>>
pub(crate) fn uniform_check_program( &self, program: &WebGLProgram, location: &WebGLUniformLocation, ) -> WebGLResult<()>
fn uniform_vec_section_int( &self, vec: Int32ArrayOrLongSequence, offset: u32, length: u32, uniform_size: usize, uniform_location: &WebGLUniformLocation, ) -> WebGLResult<Vec<i32>>
fn uniform_vec_section_float( &self, vec: Float32ArrayOrUnrestrictedFloatSequence, offset: u32, length: u32, uniform_size: usize, uniform_location: &WebGLUniformLocation, ) -> WebGLResult<Vec<f32>>
pub(crate) fn uniform_vec_section<T: Clone>( &self, vec: Vec<T>, offset: u32, length: u32, uniform_size: usize, uniform_location: &WebGLUniformLocation, ) -> WebGLResult<Vec<T>>
pub(crate) fn uniform_matrix_section( &self, vec: Float32ArrayOrUnrestrictedFloatSequence, offset: u32, length: u32, transpose: bool, uniform_size: usize, uniform_location: &WebGLUniformLocation, ) -> WebGLResult<Vec<f32>>
pub(crate) fn get_draw_framebuffer_slot( &self, ) -> &MutNullableDom<WebGLFramebuffer>
pub(crate) fn get_read_framebuffer_slot( &self, ) -> &MutNullableDom<WebGLFramebuffer>
pub(crate) fn validate_new_framebuffer_binding( &self, framebuffer: Option<&WebGLFramebuffer>, ) -> WebGLResult<()>
pub(crate) fn bind_framebuffer_to( &self, target: u32, framebuffer: Option<&WebGLFramebuffer>, slot: &MutNullableDom<WebGLFramebuffer>, )
pub(crate) fn renderbuffer_storage( &self, target: u32, samples: i32, internal_format: u32, width: i32, height: i32, )
pub(crate) fn valid_color_attachment_enum(&self, attachment: u32) -> bool
pub(crate) fn compressed_tex_image_2d( &self, target: u32, level: i32, internal_format: u32, width: i32, height: i32, border: i32, data: &[u8], )
pub(crate) fn compressed_tex_sub_image_2d( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, width: i32, height: i32, format: u32, data: &[u8], )
pub(crate) fn uniform1iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, src_offset: u32, src_length: u32, )
pub(crate) fn uniform1fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32, )
pub(crate) fn uniform2fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32, )
pub(crate) fn uniform2iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, src_offset: u32, src_length: u32, )
pub(crate) fn uniform3fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32, )
pub(crate) fn uniform3iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, src_offset: u32, src_length: u32, )
pub(crate) fn uniform4iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, src_offset: u32, src_length: u32, )
pub(crate) fn uniform4fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32, )
pub(crate) fn uniform_matrix_2fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32, )
pub(crate) fn uniform_matrix_3fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32, )
pub(crate) fn uniform_matrix_4fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32, )
pub(crate) fn get_buffer_param( &self, buffer: Option<Root<Dom<WebGLBuffer>>>, parameter: u32, retval: MutableHandleValue<'_>, )
Trait Implementations§
source§impl DomObject for WebGLRenderingContext
impl DomObject for WebGLRenderingContext
source§impl DomObjectWrap for WebGLRenderingContext
impl DomObjectWrap for WebGLRenderingContext
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContext_Binding::Wrap::<dom::bindings::codegen::DomTypeHolder::DomTypeHolder> as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::webglrenderingcontext::WebGLRenderingContext>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::webglrenderingcontext::WebGLRenderingContext>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContext_Binding::Wrap::<dom::bindings::codegen::DomTypeHolder::DomTypeHolder> as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::webglrenderingcontext::WebGLRenderingContext>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::webglrenderingcontext::WebGLRenderingContext>>}
Function pointer to the general wrap function type
source§impl Drop for WebGLRenderingContext
impl Drop for WebGLRenderingContext
source§impl HasParent for WebGLRenderingContext
impl HasParent for WebGLRenderingContext
source§impl IDLInterface for WebGLRenderingContext
impl IDLInterface for WebGLRenderingContext
source§impl MallocSizeOf for WebGLRenderingContext
impl MallocSizeOf for WebGLRenderingContext
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl MutDomObject for WebGLRenderingContext
impl MutDomObject for WebGLRenderingContext
source§impl PartialEq for WebGLRenderingContext
impl PartialEq for WebGLRenderingContext
source§impl Traceable for WebGLRenderingContext
impl Traceable for WebGLRenderingContext
source§impl WebGLRenderingContextMethods<DomTypeHolder> for WebGLRenderingContext
impl WebGLRenderingContextMethods<DomTypeHolder> for WebGLRenderingContext
source§fn GetAttachedShaders(
&self,
program: &WebGLProgram,
) -> Option<Vec<Root<Dom<WebGLShader>>>>
fn GetAttachedShaders( &self, program: &WebGLProgram, ) -> Option<Vec<Root<Dom<WebGLShader>>>>
fn Canvas(&self) -> HTMLCanvasElementOrOffscreenCanvas
fn Flush(&self)
fn Finish(&self)
fn DrawingBufferWidth(&self) -> i32
fn DrawingBufferHeight(&self) -> i32
fn GetBufferParameter( &self, _cx: SafeJSContext, target: u32, parameter: u32, retval: MutableHandleValue<'_>, )
fn GetParameter( &self, cx: SafeJSContext, parameter: u32, retval: MutableHandleValue<'_>, )
fn GetTexParameter( &self, _cx: SafeJSContext, target: u32, pname: u32, retval: MutableHandleValue<'_>, )
fn GetError(&self) -> u32
fn GetContextAttributes(&self) -> Option<WebGLContextAttributes>
fn IsContextLost(&self) -> bool
fn GetSupportedExtensions(&self) -> Option<Vec<DOMString>>
fn GetExtension( &self, _cx: SafeJSContext, name: DOMString, ) -> Option<NonNull<JSObject>>
fn ActiveTexture(&self, texture: u32)
fn BlendColor(&self, r: f32, g: f32, b: f32, a: f32)
fn BlendEquation(&self, mode: u32)
fn BlendEquationSeparate(&self, mode_rgb: u32, mode_alpha: u32)
fn BlendFunc(&self, src_factor: u32, dest_factor: u32)
fn BlendFuncSeparate( &self, src_rgb: u32, dest_rgb: u32, src_alpha: u32, dest_alpha: u32, )
fn AttachShader(&self, program: &WebGLProgram, shader: &WebGLShader)
fn DetachShader(&self, program: &WebGLProgram, shader: &WebGLShader)
fn BindAttribLocation( &self, program: &WebGLProgram, index: u32, name: DOMString, )
fn BindBuffer(&self, target: u32, buffer: Option<&WebGLBuffer>)
fn BindFramebuffer(&self, target: u32, framebuffer: Option<&WebGLFramebuffer>)
fn BindRenderbuffer( &self, target: u32, renderbuffer: Option<&WebGLRenderbuffer>, )
fn BindTexture(&self, target: u32, texture: Option<&WebGLTexture>)
fn GenerateMipmap(&self, target: u32)
fn BufferData_( &self, target: u32, data: Option<ArrayBufferViewOrArrayBuffer>, usage: u32, )
fn BufferData(&self, target: u32, size: i64, usage: u32)
fn BufferSubData( &self, target: u32, offset: i64, data: ArrayBufferViewOrArrayBuffer, )
fn CompressedTexImage2D( &self, target: u32, level: i32, internal_format: u32, width: i32, height: i32, border: i32, data: CustomAutoRooterGuard<'_, ArrayBufferView>, )
fn CompressedTexSubImage2D( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, width: i32, height: i32, format: u32, data: CustomAutoRooterGuard<'_, ArrayBufferView>, )
fn CopyTexImage2D( &self, target: u32, level: i32, internal_format: u32, x: i32, y: i32, width: i32, height: i32, border: i32, )
fn CopyTexSubImage2D( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, x: i32, y: i32, width: i32, height: i32, )
fn Clear(&self, mask: u32)
fn ClearColor(&self, red: f32, green: f32, blue: f32, alpha: f32)
fn ClearDepth(&self, depth: f32)
fn ClearStencil(&self, stencil: i32)
fn ColorMask(&self, r: bool, g: bool, b: bool, a: bool)
fn CullFace(&self, mode: u32)
fn FrontFace(&self, mode: u32)
fn DepthFunc(&self, func: u32)
fn DepthMask(&self, flag: bool)
fn DepthRange(&self, near: f32, far: f32)
fn Enable(&self, cap: u32)
fn Disable(&self, cap: u32)
fn CompileShader(&self, shader: &WebGLShader)
fn CreateBuffer(&self) -> Option<Root<Dom<WebGLBuffer>>>
fn CreateFramebuffer(&self) -> Option<Root<Dom<WebGLFramebuffer>>>
fn CreateRenderbuffer(&self) -> Option<Root<Dom<WebGLRenderbuffer>>>
fn CreateTexture(&self) -> Option<Root<Dom<WebGLTexture>>>
fn CreateProgram(&self) -> Option<Root<Dom<WebGLProgram>>>
fn CreateShader(&self, shader_type: u32) -> Option<Root<Dom<WebGLShader>>>
fn DeleteBuffer(&self, buffer: Option<&WebGLBuffer>)
fn DeleteFramebuffer(&self, framebuffer: Option<&WebGLFramebuffer>)
fn DeleteRenderbuffer(&self, renderbuffer: Option<&WebGLRenderbuffer>)
fn DeleteTexture(&self, texture: Option<&WebGLTexture>)
fn DeleteProgram(&self, program: Option<&WebGLProgram>)
fn DeleteShader(&self, shader: Option<&WebGLShader>)
fn DrawArrays(&self, mode: u32, first: i32, count: i32)
fn DrawElements(&self, mode: u32, count: i32, type_: u32, offset: i64)
fn EnableVertexAttribArray(&self, attrib_id: u32)
fn DisableVertexAttribArray(&self, attrib_id: u32)
fn GetActiveUniform( &self, program: &WebGLProgram, index: u32, ) -> Option<Root<Dom<WebGLActiveInfo>>>
fn GetActiveAttrib( &self, program: &WebGLProgram, index: u32, ) -> Option<Root<Dom<WebGLActiveInfo>>>
fn GetAttribLocation(&self, program: &WebGLProgram, name: DOMString) -> i32
fn GetFramebufferAttachmentParameter( &self, cx: SafeJSContext, target: u32, attachment: u32, pname: u32, retval: MutableHandleValue<'_>, )
fn GetRenderbufferParameter( &self, _cx: SafeJSContext, target: u32, pname: u32, retval: MutableHandleValue<'_>, )
fn GetProgramInfoLog(&self, program: &WebGLProgram) -> Option<DOMString>
fn GetProgramParameter( &self, _: SafeJSContext, program: &WebGLProgram, param: u32, retval: MutableHandleValue<'_>, )
fn GetShaderInfoLog(&self, shader: &WebGLShader) -> Option<DOMString>
fn GetShaderParameter( &self, _: SafeJSContext, shader: &WebGLShader, param: u32, retval: MutableHandleValue<'_>, )
fn GetShaderPrecisionFormat( &self, shader_type: u32, precision_type: u32, ) -> Option<Root<Dom<WebGLShaderPrecisionFormat>>>
fn GetUniformLocation( &self, program: &WebGLProgram, name: DOMString, ) -> Option<Root<Dom<WebGLUniformLocation>>>
fn GetVertexAttrib( &self, cx: SafeJSContext, index: u32, param: u32, retval: MutableHandleValue<'_>, )
fn GetVertexAttribOffset(&self, index: u32, pname: u32) -> i64
fn Hint(&self, target: u32, mode: u32)
fn IsBuffer(&self, buffer: Option<&WebGLBuffer>) -> bool
fn IsEnabled(&self, cap: u32) -> bool
fn IsFramebuffer(&self, frame_buffer: Option<&WebGLFramebuffer>) -> bool
fn IsProgram(&self, program: Option<&WebGLProgram>) -> bool
fn IsRenderbuffer(&self, render_buffer: Option<&WebGLRenderbuffer>) -> bool
fn IsShader(&self, shader: Option<&WebGLShader>) -> bool
fn IsTexture(&self, texture: Option<&WebGLTexture>) -> bool
fn LineWidth(&self, width: f32)
fn PixelStorei(&self, param_name: u32, param_value: i32)
fn PolygonOffset(&self, factor: f32, units: f32)
fn ReadPixels( &self, x: i32, y: i32, width: i32, height: i32, format: u32, pixel_type: u32, pixels: CustomAutoRooterGuard<'_, Option<ArrayBufferView>>, )
fn SampleCoverage(&self, value: f32, invert: bool)
fn Scissor(&self, x: i32, y: i32, width: i32, height: i32)
fn StencilFunc(&self, func: u32, ref_: i32, mask: u32)
fn StencilFuncSeparate(&self, face: u32, func: u32, ref_: i32, mask: u32)
fn StencilMask(&self, mask: u32)
fn StencilMaskSeparate(&self, face: u32, mask: u32)
fn StencilOp(&self, fail: u32, zfail: u32, zpass: u32)
fn StencilOpSeparate(&self, face: u32, fail: u32, zfail: u32, zpass: u32)
fn LinkProgram(&self, program: &WebGLProgram)
fn ShaderSource(&self, shader: &WebGLShader, source: DOMString)
fn GetShaderSource(&self, shader: &WebGLShader) -> Option<DOMString>
fn Uniform1f(&self, location: Option<&WebGLUniformLocation>, val: f32)
fn Uniform1i(&self, location: Option<&WebGLUniformLocation>, val: i32)
fn Uniform1iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, )
fn Uniform1fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, )
fn Uniform2f(&self, location: Option<&WebGLUniformLocation>, x: f32, y: f32)
fn Uniform2fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, )
fn Uniform2i(&self, location: Option<&WebGLUniformLocation>, x: i32, y: i32)
fn Uniform2iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, )
fn Uniform3f( &self, location: Option<&WebGLUniformLocation>, x: f32, y: f32, z: f32, )
fn Uniform3fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, )
fn Uniform3i( &self, location: Option<&WebGLUniformLocation>, x: i32, y: i32, z: i32, )
fn Uniform3iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, )
fn Uniform4i( &self, location: Option<&WebGLUniformLocation>, x: i32, y: i32, z: i32, w: i32, )
fn Uniform4iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, )
fn Uniform4f( &self, location: Option<&WebGLUniformLocation>, x: f32, y: f32, z: f32, w: f32, )
fn Uniform4fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, )
fn UniformMatrix2fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, )
fn UniformMatrix3fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, )
fn UniformMatrix4fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, )
fn GetUniform( &self, cx: SafeJSContext, program: &WebGLProgram, location: &WebGLUniformLocation, rval: MutableHandleValue<'_>, )
fn UseProgram(&self, program: Option<&WebGLProgram>)
fn ValidateProgram(&self, program: &WebGLProgram)
fn VertexAttrib1f(&self, indx: u32, x: f32)
fn VertexAttrib1fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
fn VertexAttrib2f(&self, indx: u32, x: f32, y: f32)
fn VertexAttrib2fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
fn VertexAttrib3f(&self, indx: u32, x: f32, y: f32, z: f32)
fn VertexAttrib3fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
fn VertexAttrib4f(&self, indx: u32, x: f32, y: f32, z: f32, w: f32)
fn VertexAttrib4fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
fn VertexAttribPointer( &self, index: u32, size: i32, type_: u32, normalized: bool, stride: i32, offset: i64, )
fn Viewport(&self, x: i32, y: i32, width: i32, height: i32)
fn TexImage2D( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, border: i32, format: u32, data_type: u32, pixels: CustomAutoRooterGuard<'_, Option<ArrayBufferView>>, ) -> Result<(), Error>
fn TexImage2D_( &self, target: u32, level: i32, internal_format: i32, format: u32, data_type: u32, source: TexImageSource, ) -> Result<(), Error>
fn TexSubImage2D( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, width: i32, height: i32, format: u32, data_type: u32, pixels: CustomAutoRooterGuard<'_, Option<ArrayBufferView>>, ) -> Result<(), Error>
fn TexSubImage2D_( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, format: u32, data_type: u32, source: TexImageSource, ) -> Result<(), Error>
fn TexParameterf(&self, target: u32, name: u32, value: f32)
fn TexParameteri(&self, target: u32, name: u32, value: i32)
fn CheckFramebufferStatus(&self, target: u32) -> u32
fn RenderbufferStorage( &self, target: u32, internal_format: u32, width: i32, height: i32, )
fn FramebufferRenderbuffer( &self, target: u32, attachment: u32, renderbuffertarget: u32, rb: Option<&WebGLRenderbuffer>, )
fn FramebufferTexture2D( &self, target: u32, attachment: u32, textarget: u32, texture: Option<&WebGLTexture>, level: i32, )
impl Eq for WebGLRenderingContext
Auto Trait Implementations§
impl !Freeze for WebGLRenderingContext
impl !RefUnwindSafe for WebGLRenderingContext
impl !Send for WebGLRenderingContext
impl !Sync for WebGLRenderingContext
impl Unpin for WebGLRenderingContext
impl !UnwindSafe for WebGLRenderingContext
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert