#[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: GlTypeImplementations§
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<DomTypeHolder>, webgl_version: WebGLVersion, size: Size2D<u32>, attrs: GLContextAttributes, can_gc: CanGc, ) -> Option<DomRoot<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 bound_draw_framebuffer(&self) -> Option<DomRoot<WebGLFramebuffer>>
pub(crate) fn current_vao(&self) -> DomRoot<WebGLVertexArrayObjectOES>
pub(crate) fn current_vao_webgl2(&self) -> DomRoot<WebGLVertexArrayObject>
pub(crate) fn current_vertex_attribs(&self) -> RefMut<'_, Box<[VertexAttrib]>>
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)
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
pub(crate) fn get_current_unpack_state( &self, premultiplied: Alpha, ) -> (Option<AlphaTreatment>, YAxisTreatment)
Sourcefn validate_filterable_texture(
&self,
texture: &WebGLTexture,
target: TexImageTarget,
level: u32,
internal_format: TexFormat,
size: Size2D<u32>,
data_type: TexDataType,
) -> bool
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<DomTypeHolder>, ) -> Fallible<Option<TexPixels>>
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: DomRoot<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) -> Option<ImageKey>
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 array_buffer(&self) -> Option<DomRoot<WebGLBuffer>>
pub(crate) fn array_buffer_slot(&self) -> &MutNullableDom<WebGLBuffer>
pub(crate) fn bound_buffer( &self, target: u32, ) -> WebGLResult<Option<DomRoot<WebGLBuffer>>>
pub(crate) fn buffer_usage(&self, usage: u32) -> WebGLResult<u32>
pub(crate) fn create_vertex_array( &self, ) -> Option<DomRoot<WebGLVertexArrayObjectOES>>
pub(crate) fn create_vertex_array_webgl2( &self, ) -> Option<DomRoot<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<DomRoot<WebGLBuffer>>, )
pub(crate) fn buffer_data_( &self, target: u32, size: i64, usage: u32, bound_buffer: Option<DomRoot<WebGLBuffer>>, )
pub(crate) fn buffer_sub_data( &self, target: u32, offset: i64, data: ArrayBufferViewOrArrayBuffer, bound_buffer: Option<DomRoot<WebGLBuffer>>, )
pub(crate) fn bind_buffer_maybe( &self, slot: &MutNullableDom<WebGLBuffer>, target: u32, buffer: Option<&WebGLBuffer>, )
pub(crate) fn current_program(&self) -> Option<DomRoot<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<DomRoot<WebGLBuffer>>, parameter: u32, retval: MutableHandleValue<'_>, )
Trait Implementations§
Source§impl CanvasContext for WebGLRenderingContext
impl CanvasContext for WebGLRenderingContext
Source§fn get_image_data(&self) -> Option<Snapshot>
fn get_image_data(&self) -> Option<Snapshot>
type ID = WebGLContextId
fn context_id(&self) -> Self::ID
fn canvas(&self) -> Option<HTMLCanvasElementOrOffscreenCanvas<DomTypeHolder>>
fn resize(&self)
fn reset_bitmap(&self)
fn mark_as_dirty(&self)
fn origin_is_clean(&self) -> bool
fn size(&self) -> Size2D<u32>
Source§fn update_rendering(&self, _canvas_epoch: Epoch) -> bool
fn update_rendering(&self, _canvas_epoch: Epoch) -> bool
Request that the
CanvasContext update the rendering of its contents,
returning true if new image was produced. Read morefn onscreen(&self) -> bool
Source§impl DomObject for WebGLRenderingContext
impl DomObject for WebGLRenderingContext
Source§impl DomObjectWrap<DomTypeHolder> for WebGLRenderingContext
impl DomObjectWrap<DomTypeHolder> for WebGLRenderingContext
Source§const WRAP: unsafe fn(SafeJSContext, &GlobalScope, Option<HandleObject<'_>>, Box<Self>, CanGc) -> Root<Dom<Self>> = {script_bindings::codegen::GenericBindings::WebGLRenderingContextBinding::Wrap::<dom::bindings::codegen::DomTypeHolder::DomTypeHolder> as for<'a, 'b> unsafe fn(script_bindings::script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::webgl::webglrenderingcontext::WebGLRenderingContext>, script_bindings::script_runtime::CanGc) -> script_bindings::root::Root<script_bindings::root::Dom<dom::webgl::webglrenderingcontext::WebGLRenderingContext>>}
const WRAP: unsafe fn(SafeJSContext, &GlobalScope, Option<HandleObject<'_>>, Box<Self>, CanGc) -> Root<Dom<Self>> = {script_bindings::codegen::GenericBindings::WebGLRenderingContextBinding::Wrap::<dom::bindings::codegen::DomTypeHolder::DomTypeHolder> as for<'a, 'b> unsafe fn(script_bindings::script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::webgl::webglrenderingcontext::WebGLRenderingContext>, script_bindings::script_runtime::CanGc) -> script_bindings::root::Root<script_bindings::root::Dom<dom::webgl::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 Canvas(&self) -> HTMLCanvasElementOrOffscreenCanvas<DomTypeHolder>
fn Canvas(&self) -> HTMLCanvasElementOrOffscreenCanvas<DomTypeHolder>
Source§fn DrawingBufferWidth(&self) -> i32
fn DrawingBufferWidth(&self) -> i32
Source§fn DrawingBufferHeight(&self) -> i32
fn DrawingBufferHeight(&self) -> i32
Source§fn GetBufferParameter(
&self,
_cx: SafeJSContext,
target: u32,
parameter: u32,
retval: MutableHandleValue<'_>,
)
fn GetBufferParameter( &self, _cx: SafeJSContext, target: u32, parameter: u32, retval: MutableHandleValue<'_>, )
Source§fn GetParameter(
&self,
cx: SafeJSContext,
parameter: u32,
retval: MutableHandleValue<'_>,
)
fn GetParameter( &self, cx: SafeJSContext, parameter: u32, retval: MutableHandleValue<'_>, )
Source§fn GetTexParameter(
&self,
_cx: SafeJSContext,
target: u32,
pname: u32,
retval: MutableHandleValue<'_>,
)
fn GetTexParameter( &self, _cx: SafeJSContext, target: u32, pname: u32, retval: MutableHandleValue<'_>, )
Source§fn GetContextAttributes(&self) -> Option<WebGLContextAttributes>
fn GetContextAttributes(&self) -> Option<WebGLContextAttributes>
Source§fn IsContextLost(&self) -> bool
fn IsContextLost(&self) -> bool
Source§fn GetExtension(
&self,
_cx: SafeJSContext,
name: DOMString,
) -> Option<NonNull<JSObject>>
fn GetExtension( &self, _cx: SafeJSContext, name: DOMString, ) -> Option<NonNull<JSObject>>
Source§fn ActiveTexture(&self, texture: u32)
fn ActiveTexture(&self, texture: u32)
Source§fn BlendEquation(&self, mode: u32)
fn BlendEquation(&self, mode: u32)
Source§fn BlendEquationSeparate(&self, mode_rgb: u32, mode_alpha: u32)
fn BlendEquationSeparate(&self, mode_rgb: u32, mode_alpha: u32)
Source§fn AttachShader(&self, program: &WebGLProgram, shader: &WebGLShader)
fn AttachShader(&self, program: &WebGLProgram, shader: &WebGLShader)
Source§fn DetachShader(&self, program: &WebGLProgram, shader: &WebGLShader)
fn DetachShader(&self, program: &WebGLProgram, shader: &WebGLShader)
Source§fn BindAttribLocation(
&self,
program: &WebGLProgram,
index: u32,
name: DOMString,
)
fn BindAttribLocation( &self, program: &WebGLProgram, index: u32, name: DOMString, )
Source§fn BindBuffer(&self, target: u32, buffer: Option<&WebGLBuffer>)
fn BindBuffer(&self, target: u32, buffer: Option<&WebGLBuffer>)
Source§fn BindFramebuffer(&self, target: u32, framebuffer: Option<&WebGLFramebuffer>)
fn BindFramebuffer(&self, target: u32, framebuffer: Option<&WebGLFramebuffer>)
Source§fn BindRenderbuffer(
&self,
target: u32,
renderbuffer: Option<&WebGLRenderbuffer>,
)
fn BindRenderbuffer( &self, target: u32, renderbuffer: Option<&WebGLRenderbuffer>, )
Source§fn BindTexture(&self, target: u32, texture: Option<&WebGLTexture>)
fn BindTexture(&self, target: u32, texture: Option<&WebGLTexture>)
Source§fn GenerateMipmap(&self, target: u32)
fn GenerateMipmap(&self, target: u32)
Source§fn BufferData_(
&self,
target: u32,
data: Option<ArrayBufferViewOrArrayBuffer>,
usage: u32,
)
fn BufferData_( &self, target: u32, data: Option<ArrayBufferViewOrArrayBuffer>, usage: u32, )
Source§fn CopyTexImage2D(
&self,
target: u32,
level: i32,
internal_format: u32,
x: i32,
y: i32,
width: i32,
height: i32,
border: i32,
)
fn CopyTexImage2D( &self, target: u32, level: i32, internal_format: u32, x: i32, y: i32, width: i32, height: i32, border: i32, )
Source§fn CopyTexSubImage2D(
&self,
target: u32,
level: i32,
xoffset: i32,
yoffset: i32,
x: i32,
y: i32,
width: i32,
height: i32,
)
fn CopyTexSubImage2D( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, x: i32, y: i32, width: i32, height: i32, )
Source§fn ClearDepth(&self, depth: f32)
fn ClearDepth(&self, depth: f32)
Source§fn ClearStencil(&self, stencil: i32)
fn ClearStencil(&self, stencil: i32)
Source§fn DepthRange(&self, near: f32, far: f32)
fn DepthRange(&self, near: f32, far: f32)
Source§fn CompileShader(&self, shader: &WebGLShader)
fn CompileShader(&self, shader: &WebGLShader)
Source§fn CreateBuffer(&self) -> Option<DomRoot<WebGLBuffer>>
fn CreateBuffer(&self) -> Option<DomRoot<WebGLBuffer>>
Source§fn CreateFramebuffer(&self) -> Option<DomRoot<WebGLFramebuffer>>
fn CreateFramebuffer(&self) -> Option<DomRoot<WebGLFramebuffer>>
Source§fn CreateRenderbuffer(&self) -> Option<DomRoot<WebGLRenderbuffer>>
fn CreateRenderbuffer(&self) -> Option<DomRoot<WebGLRenderbuffer>>
Source§fn CreateTexture(&self) -> Option<DomRoot<WebGLTexture>>
fn CreateTexture(&self) -> Option<DomRoot<WebGLTexture>>
Source§fn CreateProgram(&self) -> Option<DomRoot<WebGLProgram>>
fn CreateProgram(&self) -> Option<DomRoot<WebGLProgram>>
Source§fn CreateShader(&self, shader_type: u32) -> Option<DomRoot<WebGLShader>>
fn CreateShader(&self, shader_type: u32) -> Option<DomRoot<WebGLShader>>
Source§fn DeleteBuffer(&self, buffer: Option<&WebGLBuffer>)
fn DeleteBuffer(&self, buffer: Option<&WebGLBuffer>)
Source§fn DeleteFramebuffer(&self, framebuffer: Option<&WebGLFramebuffer>)
fn DeleteFramebuffer(&self, framebuffer: Option<&WebGLFramebuffer>)
Source§fn DeleteRenderbuffer(&self, renderbuffer: Option<&WebGLRenderbuffer>)
fn DeleteRenderbuffer(&self, renderbuffer: Option<&WebGLRenderbuffer>)
Source§fn DeleteTexture(&self, texture: Option<&WebGLTexture>)
fn DeleteTexture(&self, texture: Option<&WebGLTexture>)
Source§fn DeleteProgram(&self, program: Option<&WebGLProgram>)
fn DeleteProgram(&self, program: Option<&WebGLProgram>)
Source§fn DeleteShader(&self, shader: Option<&WebGLShader>)
fn DeleteShader(&self, shader: Option<&WebGLShader>)
Source§fn EnableVertexAttribArray(&self, attrib_id: u32)
fn EnableVertexAttribArray(&self, attrib_id: u32)
Source§fn DisableVertexAttribArray(&self, attrib_id: u32)
fn DisableVertexAttribArray(&self, attrib_id: u32)
Source§fn GetActiveUniform(
&self,
program: &WebGLProgram,
index: u32,
) -> Option<DomRoot<WebGLActiveInfo>>
fn GetActiveUniform( &self, program: &WebGLProgram, index: u32, ) -> Option<DomRoot<WebGLActiveInfo>>
Source§fn GetActiveAttrib(
&self,
program: &WebGLProgram,
index: u32,
) -> Option<DomRoot<WebGLActiveInfo>>
fn GetActiveAttrib( &self, program: &WebGLProgram, index: u32, ) -> Option<DomRoot<WebGLActiveInfo>>
Source§fn GetAttribLocation(&self, program: &WebGLProgram, name: DOMString) -> i32
fn GetAttribLocation(&self, program: &WebGLProgram, name: DOMString) -> i32
Source§fn GetFramebufferAttachmentParameter(
&self,
cx: SafeJSContext,
target: u32,
attachment: u32,
pname: u32,
retval: MutableHandleValue<'_>,
)
fn GetFramebufferAttachmentParameter( &self, cx: SafeJSContext, target: u32, attachment: u32, pname: u32, retval: MutableHandleValue<'_>, )
Source§fn GetRenderbufferParameter(
&self,
_cx: SafeJSContext,
target: u32,
pname: u32,
retval: MutableHandleValue<'_>,
)
fn GetRenderbufferParameter( &self, _cx: SafeJSContext, target: u32, pname: u32, retval: MutableHandleValue<'_>, )
Source§fn GetProgramInfoLog(&self, program: &WebGLProgram) -> Option<DOMString>
fn GetProgramInfoLog(&self, program: &WebGLProgram) -> Option<DOMString>
Source§fn GetProgramParameter(
&self,
_: SafeJSContext,
program: &WebGLProgram,
param: u32,
retval: MutableHandleValue<'_>,
)
fn GetProgramParameter( &self, _: SafeJSContext, program: &WebGLProgram, param: u32, retval: MutableHandleValue<'_>, )
Source§fn GetShaderInfoLog(&self, shader: &WebGLShader) -> Option<DOMString>
fn GetShaderInfoLog(&self, shader: &WebGLShader) -> Option<DOMString>
Source§fn GetShaderParameter(
&self,
_: SafeJSContext,
shader: &WebGLShader,
param: u32,
retval: MutableHandleValue<'_>,
)
fn GetShaderParameter( &self, _: SafeJSContext, shader: &WebGLShader, param: u32, retval: MutableHandleValue<'_>, )
Source§fn GetShaderPrecisionFormat(
&self,
shader_type: u32,
precision_type: u32,
) -> Option<DomRoot<WebGLShaderPrecisionFormat>>
fn GetShaderPrecisionFormat( &self, shader_type: u32, precision_type: u32, ) -> Option<DomRoot<WebGLShaderPrecisionFormat>>
Source§fn GetUniformLocation(
&self,
program: &WebGLProgram,
name: DOMString,
) -> Option<DomRoot<WebGLUniformLocation>>
fn GetUniformLocation( &self, program: &WebGLProgram, name: DOMString, ) -> Option<DomRoot<WebGLUniformLocation>>
Source§fn GetVertexAttrib(
&self,
cx: SafeJSContext,
index: u32,
param: u32,
retval: MutableHandleValue<'_>,
)
fn GetVertexAttrib( &self, cx: SafeJSContext, index: u32, param: u32, retval: MutableHandleValue<'_>, )
Source§fn IsFramebuffer(&self, frame_buffer: Option<&WebGLFramebuffer>) -> bool
fn IsFramebuffer(&self, frame_buffer: Option<&WebGLFramebuffer>) -> bool
Source§fn IsRenderbuffer(&self, render_buffer: Option<&WebGLRenderbuffer>) -> bool
fn IsRenderbuffer(&self, render_buffer: Option<&WebGLRenderbuffer>) -> bool
Source§fn PixelStorei(&self, param_name: u32, param_value: i32)
fn PixelStorei(&self, param_name: u32, param_value: i32)
NOTE: Usage of this function could affect rendering while we keep using readback to render to the page.
https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
Source§fn PolygonOffset(&self, factor: f32, units: f32)
fn PolygonOffset(&self, factor: f32, units: f32)
Source§fn SampleCoverage(&self, value: f32, invert: bool)
fn SampleCoverage(&self, value: f32, invert: bool)
Source§fn StencilMask(&self, mask: u32)
fn StencilMask(&self, mask: u32)
Source§fn StencilMaskSeparate(&self, face: u32, mask: u32)
fn StencilMaskSeparate(&self, face: u32, mask: u32)
Source§fn LinkProgram(&self, program: &WebGLProgram)
fn LinkProgram(&self, program: &WebGLProgram)
Source§fn ShaderSource(&self, shader: &WebGLShader, source: DOMString)
fn ShaderSource(&self, shader: &WebGLShader, source: DOMString)
Source§fn GetShaderSource(&self, shader: &WebGLShader) -> Option<DOMString>
fn GetShaderSource(&self, shader: &WebGLShader) -> Option<DOMString>
Source§fn Uniform1iv(
&self,
location: Option<&WebGLUniformLocation>,
val: Int32ArrayOrLongSequence,
)
fn Uniform1iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, )
Source§fn Uniform1fv(
&self,
location: Option<&WebGLUniformLocation>,
val: Float32ArrayOrUnrestrictedFloatSequence,
)
fn Uniform1fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, )
Source§fn Uniform2fv(
&self,
location: Option<&WebGLUniformLocation>,
val: Float32ArrayOrUnrestrictedFloatSequence,
)
fn Uniform2fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, )
Source§fn Uniform2iv(
&self,
location: Option<&WebGLUniformLocation>,
val: Int32ArrayOrLongSequence,
)
fn Uniform2iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, )
Source§fn Uniform3fv(
&self,
location: Option<&WebGLUniformLocation>,
val: Float32ArrayOrUnrestrictedFloatSequence,
)
fn Uniform3fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, )
Source§fn Uniform3iv(
&self,
location: Option<&WebGLUniformLocation>,
val: Int32ArrayOrLongSequence,
)
fn Uniform3iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, )
Source§fn Uniform4i(
&self,
location: Option<&WebGLUniformLocation>,
x: i32,
y: i32,
z: i32,
w: i32,
)
fn Uniform4i( &self, location: Option<&WebGLUniformLocation>, x: i32, y: i32, z: i32, w: i32, )
Source§fn Uniform4iv(
&self,
location: Option<&WebGLUniformLocation>,
val: Int32ArrayOrLongSequence,
)
fn Uniform4iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, )
Source§fn Uniform4f(
&self,
location: Option<&WebGLUniformLocation>,
x: f32,
y: f32,
z: f32,
w: f32,
)
fn Uniform4f( &self, location: Option<&WebGLUniformLocation>, x: f32, y: f32, z: f32, w: f32, )
Source§fn Uniform4fv(
&self,
location: Option<&WebGLUniformLocation>,
val: Float32ArrayOrUnrestrictedFloatSequence,
)
fn Uniform4fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, )
Source§fn UniformMatrix2fv(
&self,
location: Option<&WebGLUniformLocation>,
transpose: bool,
val: Float32ArrayOrUnrestrictedFloatSequence,
)
fn UniformMatrix2fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, )
Source§fn UniformMatrix3fv(
&self,
location: Option<&WebGLUniformLocation>,
transpose: bool,
val: Float32ArrayOrUnrestrictedFloatSequence,
)
fn UniformMatrix3fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, )
Source§fn UniformMatrix4fv(
&self,
location: Option<&WebGLUniformLocation>,
transpose: bool,
val: Float32ArrayOrUnrestrictedFloatSequence,
)
fn UniformMatrix4fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, )
Source§fn UseProgram(&self, program: Option<&WebGLProgram>)
fn UseProgram(&self, program: Option<&WebGLProgram>)
Source§fn ValidateProgram(&self, program: &WebGLProgram)
fn ValidateProgram(&self, program: &WebGLProgram)
Source§fn VertexAttrib1f(&self, indx: u32, x: f32)
fn VertexAttrib1f(&self, indx: u32, x: f32)
Source§fn VertexAttrib1fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
fn VertexAttrib1fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
Source§fn VertexAttrib2fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
fn VertexAttrib2fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
Source§fn VertexAttrib3fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
fn VertexAttrib3fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
Source§fn VertexAttrib4fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
fn VertexAttrib4fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)
Source§fn VertexAttribPointer(
&self,
index: u32,
size: i32,
type_: u32,
normalized: bool,
stride: i32,
offset: i64,
)
fn VertexAttribPointer( &self, index: u32, size: i32, type_: u32, normalized: bool, stride: i32, offset: i64, )
Source§fn TexImage2D_(
&self,
target: u32,
level: i32,
internal_format: i32,
format: u32,
data_type: u32,
source: TexImageSource<DomTypeHolder>,
) -> ErrorResult
fn TexImage2D_( &self, target: u32, level: i32, internal_format: i32, format: u32, data_type: u32, source: TexImageSource<DomTypeHolder>, ) -> ErrorResult
Source§fn TexSubImage2D_(
&self,
target: u32,
level: i32,
xoffset: i32,
yoffset: i32,
format: u32,
data_type: u32,
source: TexImageSource<DomTypeHolder>,
) -> ErrorResult
fn TexSubImage2D_( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, format: u32, data_type: u32, source: TexImageSource<DomTypeHolder>, ) -> ErrorResult
Source§fn CheckFramebufferStatus(&self, target: u32) -> u32
fn CheckFramebufferStatus(&self, target: u32) -> u32
Source§fn FramebufferRenderbuffer(
&self,
target: u32,
attachment: u32,
renderbuffertarget: u32,
rb: Option<&WebGLRenderbuffer>,
)
fn FramebufferRenderbuffer( &self, target: u32, attachment: u32, renderbuffertarget: u32, rb: Option<&WebGLRenderbuffer>, )
Source§fn FramebufferTexture2D(
&self,
target: u32,
attachment: u32,
textarget: u32,
texture: Option<&WebGLTexture>,
level: i32,
)
fn FramebufferTexture2D( &self, target: u32, attachment: u32, textarget: u32, texture: Option<&WebGLTexture>, level: i32, )
Source§fn GetAttachedShaders(
&self,
program: &WebGLProgram,
) -> Option<Vec<DomRoot<WebGLShader>>>
fn GetAttachedShaders( &self, program: &WebGLProgram, ) -> Option<Vec<DomRoot<WebGLShader>>>
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 ReadPixels( &self, x: i32, y: i32, width: i32, height: i32, format: u32, pixel_type: u32, pixels: CustomAutoRooterGuard<'_, Option<ArrayBufferView>>, )
fn GetUniform( &self, cx: SafeJSContext, program: &WebGLProgram, location: &WebGLUniformLocation, rval: MutableHandleValue<'_>, )
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>>, ) -> ErrorResult
fn TexSubImage2D( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, width: i32, height: i32, format: u32, data_type: u32, pixels: CustomAutoRooterGuard<'_, Option<ArrayBufferView>>, ) -> ErrorResult
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<D, T> DomGlobalGeneric<D> for T
impl<D, T> DomGlobalGeneric<D> for T
Source§fn global_(&self, realm: InRealm<'_>) -> Root<Dom<<D as DomTypes>::GlobalScope>>where
Self: Sized,
fn global_(&self, realm: InRealm<'_>) -> Root<Dom<<D as DomTypes>::GlobalScope>>where
Self: Sized,
Returns the [
GlobalScope] of the realm that the DomObject was created in. If this
object is a Node, this will be different from it’s owning Document if adopted by. For
Nodes it’s almost always better to use NodeTraits::owning_global.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