#[repr(C)]
pub struct WebGLRenderingContext {
Show 28 fields reflector_: Reflector, webgl_sender: WebGLMessageSender, webrender_image: ImageKey, webgl_version: WebGLVersion, glsl_version: WebGLSLVersion, limits: GLLimits, canvas: Dom<HTMLCanvasElement>, 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: Dom<HTMLCanvasElement>§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

source§

impl WebGLRenderingContext

source

pub fn new_inherited( window: &Window, canvas: &HTMLCanvasElement, webgl_version: WebGLVersion, size: Size2D<u32>, attrs: GLContextAttributes ) -> Result<WebGLRenderingContext, String>

source

pub fn new( window: &Window, canvas: &HTMLCanvasElement, webgl_version: WebGLVersion, size: Size2D<u32>, attrs: GLContextAttributes ) -> Option<Root<Dom<WebGLRenderingContext>>>

source

pub fn webgl_version(&self) -> WebGLVersion

source

pub fn limits(&self) -> &GLLimits

source

pub fn texture_unpacking_alignment(&self) -> u32

source

pub fn current_vao(&self) -> Root<Dom<WebGLVertexArrayObjectOES>>

source

pub fn current_vao_webgl2(&self) -> Root<Dom<WebGLVertexArrayObject>>

source

pub fn current_vertex_attribs(&self) -> RefMut<'_, Box<[VertexAttrib]>>

source

pub fn recreate(&self, size: Size2D<u32>)

source

pub fn context_id(&self) -> WebGLContextId

source

pub fn onscreen(&self) -> bool

source

pub fn send_command(&self, command: WebGLCommand)

source

pub fn send_command_ignored(&self, command: WebGLCommand)

source

pub fn webgl_error(&self, err: WebGLError)

source

pub fn validate_framebuffer(&self) -> WebGLResult<()>

source

pub fn validate_ownership<T>(&self, object: &T) -> WebGLResult<()>where T: DerivedFrom<WebGLObject>,

source

pub fn with_location<F>(&self, location: Option<&WebGLUniformLocation>, f: F)where F: FnOnce(&WebGLUniformLocation) -> WebGLResult<()>,

source

pub fn textures(&self) -> &Textures

source

fn tex_parameter(&self, target: u32, param: u32, value: TexParameterValue)

source

pub fn mark_as_dirty(&self)

source

fn vertex_attrib(&self, indx: u32, x: f32, y: f32, z: f32, w: f32)

source

pub fn get_current_framebuffer_size(&self) -> Option<(i32, i32)>

source

pub fn get_texture_packing_alignment(&self) -> u8

source

fn validate_filterable_texture( &self, texture: &WebGLTexture, target: TexImageTarget, level: u32, internal_format: TexFormat, size: Size2D<u32>, data_type: TexDataType ) -> bool

source

fn validate_stencil_actions(&self, action: u32) -> bool

source

pub fn get_image_pixels( &self, source: TexImageSource ) -> Result<Option<TexPixels>, Error>

source

pub fn validate_tex_image_2d_data( &self, width: u32, height: u32, format: TexFormat, data_type: TexDataType, unpacking_alignment: u32, data: Option<&ArrayBufferView> ) -> Result<u32, ()>

source

pub 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 )

source

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 )

source

fn get_gl_extensions(&self) -> String

source

pub(crate) fn layout_handle(&self) -> HTMLCanvasDataSource

source

pub fn draw_arrays_instanced( &self, mode: u32, first: i32, count: i32, primcount: i32 ) -> WebGLResult<()>

source

pub fn draw_elements_instanced( &self, mode: u32, count: i32, type_: u32, offset: i64, primcount: i32 ) -> WebGLResult<()>

source

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

source

pub fn get_image_data(&self, size: Size2D<u32>) -> Option<Vec<u8>>

source

pub fn array_buffer(&self) -> Option<Root<Dom<WebGLBuffer>>>

source

pub fn array_buffer_slot(&self) -> &MutNullableDom<WebGLBuffer>

source

pub fn bound_buffer( &self, target: u32 ) -> WebGLResult<Option<Root<Dom<WebGLBuffer>>>>

source

pub fn buffer_usage(&self, usage: u32) -> WebGLResult<u32>

source

pub fn create_vertex_array( &self ) -> Option<Root<Dom<WebGLVertexArrayObjectOES>>>

source

pub fn create_vertex_array_webgl2( &self ) -> Option<Root<Dom<WebGLVertexArrayObject>>>

source

pub fn delete_vertex_array(&self, vao: Option<&WebGLVertexArrayObjectOES>)

source

pub fn delete_vertex_array_webgl2(&self, vao: Option<&WebGLVertexArrayObject>)

source

pub fn is_vertex_array(&self, vao: Option<&WebGLVertexArrayObjectOES>) -> bool

source

pub fn is_vertex_array_webgl2( &self, vao: Option<&WebGLVertexArrayObject> ) -> bool

source

pub fn bind_vertex_array(&self, vao: Option<&WebGLVertexArrayObjectOES>)

source

pub fn bind_vertex_array_webgl2(&self, vao: Option<&WebGLVertexArrayObject>)

source

fn validate_blend_mode(&self, mode: u32) -> WebGLResult<()>

source

pub fn initialize_framebuffer(&self, clear_bits: u32)

source

pub fn extension_manager(&self) -> &WebGLExtensions

source

pub fn buffer_data( &self, target: u32, data: Option<ArrayBufferViewOrArrayBuffer>, usage: u32, bound_buffer: Option<Root<Dom<WebGLBuffer>>> )

source

pub fn buffer_data_( &self, target: u32, size: i64, usage: u32, bound_buffer: Option<Root<Dom<WebGLBuffer>>> )

source

pub fn buffer_sub_data( &self, target: u32, offset: i64, data: ArrayBufferViewOrArrayBuffer, bound_buffer: Option<Root<Dom<WebGLBuffer>>> )

source

pub fn bind_buffer_maybe( &self, slot: &MutNullableDom<WebGLBuffer>, target: u32, buffer: Option<&WebGLBuffer> )

source

pub fn current_program(&self) -> Option<Root<Dom<WebGLProgram>>>

source

pub fn uniform_check_program( &self, program: &WebGLProgram, location: &WebGLUniformLocation ) -> WebGLResult<()>

source

fn uniform_vec_section_int( &self, vec: Int32ArrayOrLongSequence, offset: u32, length: u32, uniform_size: usize, uniform_location: &WebGLUniformLocation ) -> WebGLResult<Vec<i32>>

source

fn uniform_vec_section_float( &self, vec: Float32ArrayOrUnrestrictedFloatSequence, offset: u32, length: u32, uniform_size: usize, uniform_location: &WebGLUniformLocation ) -> WebGLResult<Vec<f32>>

source

pub fn uniform_vec_section<T: Clone>( &self, vec: Vec<T>, offset: u32, length: u32, uniform_size: usize, uniform_location: &WebGLUniformLocation ) -> WebGLResult<Vec<T>>

source

pub fn uniform_matrix_section( &self, vec: Float32ArrayOrUnrestrictedFloatSequence, offset: u32, length: u32, transpose: bool, uniform_size: usize, uniform_location: &WebGLUniformLocation ) -> WebGLResult<Vec<f32>>

source

pub fn get_draw_framebuffer_slot(&self) -> &MutNullableDom<WebGLFramebuffer>

source

pub fn get_read_framebuffer_slot(&self) -> &MutNullableDom<WebGLFramebuffer>

source

pub fn validate_new_framebuffer_binding( &self, framebuffer: Option<&WebGLFramebuffer> ) -> WebGLResult<()>

source

pub fn bind_framebuffer_to( &self, target: u32, framebuffer: Option<&WebGLFramebuffer>, slot: &MutNullableDom<WebGLFramebuffer> )

source

pub fn renderbuffer_storage( &self, target: u32, samples: i32, internal_format: u32, width: i32, height: i32 )

source

pub fn valid_color_attachment_enum(&self, attachment: u32) -> bool

source

pub fn compressed_tex_image_2d<'a>( &self, target: u32, level: i32, internal_format: u32, width: i32, height: i32, border: i32, data: &'a [u8] )

source

pub fn compressed_tex_sub_image_2d<'a>( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, width: i32, height: i32, format: u32, data: &'a [u8] )

source

pub fn uniform1iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, src_offset: u32, src_length: u32 )

source

pub fn uniform1fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32 )

source

pub fn uniform2fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32 )

source

pub fn uniform2iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, src_offset: u32, src_length: u32 )

source

pub fn uniform3fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32 )

source

pub fn uniform3iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, src_offset: u32, src_length: u32 )

source

pub fn uniform4iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence, src_offset: u32, src_length: u32 )

source

pub fn uniform4fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32 )

source

pub fn uniform_matrix_2fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32 )

source

pub fn uniform_matrix_3fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32 )

source

pub fn uniform_matrix_4fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence, src_offset: u32, src_length: u32 )

source

pub fn get_buffer_param( &self, buffer: Option<Root<Dom<WebGLBuffer>>>, parameter: u32 ) -> JSVal

Trait Implementations§

source§

impl DomObject for WebGLRenderingContext

source§

fn reflector(&self) -> &Reflector

Returns the receiver’s reflector.
source§

fn global(&self) -> Root<Dom<GlobalScope>>where Self: Sized,

Returns the global scope of the realm that the DomObject was created in.
source§

impl DomObjectWrap for WebGLRenderingContext

source§

const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContext_Binding::Wrap 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>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::webglrenderingcontext::WebGLRenderingContext>>}

Function pointer to the general wrap function type
source§

impl Drop for WebGLRenderingContext

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl HasParent for WebGLRenderingContext

source§

fn as_parent(&self) -> &Reflector

This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is

§

type Parent = Reflector

source§

impl IDLInterface for WebGLRenderingContext

source§

fn derives(class: &'static DOMClass) -> bool

Returns whether the given DOM class derives that interface.
source§

impl MallocSizeOf for WebGLRenderingContext

source§

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

source§

unsafe fn init_reflector(&self, obj: *mut JSObject)

Initializes the Reflector
source§

impl PartialEq<WebGLRenderingContext> for WebGLRenderingContext

source§

fn eq(&self, other: &WebGLRenderingContext) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl ToJSValConvertible for WebGLRenderingContext

source§

unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)

Convert self to a JSVal. JSAPI failure causes a panic.
source§

impl Traceable for WebGLRenderingContext

source§

unsafe fn trace(&self, tracer: *mut JSTracer)

Trace self.
source§

impl WebGLRenderingContextMethods for WebGLRenderingContext

source§

fn GetAttachedShaders( &self, program: &WebGLProgram ) -> Option<Vec<Root<Dom<WebGLShader>>>>

source§

fn MakeXRCompatible(&self) -> Rc<Promise>

source§

fn Canvas(&self) -> Root<Dom<HTMLCanvasElement>>

source§

fn Flush(&self)

source§

fn Finish(&self)

source§

fn DrawingBufferWidth(&self) -> i32

source§

fn DrawingBufferHeight(&self) -> i32

source§

fn GetBufferParameter( &self, _cx: SafeJSContext, target: u32, parameter: u32 ) -> JSVal

source§

fn GetParameter(&self, cx: SafeJSContext, parameter: u32) -> JSVal

source§

fn GetTexParameter(&self, _cx: SafeJSContext, target: u32, pname: u32) -> JSVal

source§

fn GetError(&self) -> u32

source§

fn GetContextAttributes(&self) -> Option<WebGLContextAttributes>

source§

fn IsContextLost(&self) -> bool

source§

fn GetSupportedExtensions(&self) -> Option<Vec<DOMString>>

source§

fn GetExtension( &self, _cx: SafeJSContext, name: DOMString ) -> Option<NonNull<JSObject>>

source§

fn ActiveTexture(&self, texture: u32)

source§

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

source§

fn BlendEquation(&self, mode: u32)

source§

fn BlendEquationSeparate(&self, mode_rgb: u32, mode_alpha: u32)

source§

fn BlendFunc(&self, src_factor: u32, dest_factor: u32)

source§

fn BlendFuncSeparate( &self, src_rgb: u32, dest_rgb: u32, src_alpha: u32, dest_alpha: u32 )

source§

fn AttachShader(&self, program: &WebGLProgram, shader: &WebGLShader)

source§

fn DetachShader(&self, program: &WebGLProgram, shader: &WebGLShader)

source§

fn BindAttribLocation( &self, program: &WebGLProgram, index: u32, name: DOMString )

source§

fn BindBuffer(&self, target: u32, buffer: Option<&WebGLBuffer>)

source§

fn BindFramebuffer(&self, target: u32, framebuffer: Option<&WebGLFramebuffer>)

source§

fn BindRenderbuffer( &self, target: u32, renderbuffer: Option<&WebGLRenderbuffer> )

source§

fn BindTexture(&self, target: u32, texture: Option<&WebGLTexture>)

source§

fn GenerateMipmap(&self, target: u32)

source§

fn BufferData_( &self, target: u32, data: Option<ArrayBufferViewOrArrayBuffer>, usage: u32 )

source§

fn BufferData(&self, target: u32, size: i64, usage: u32)

source§

fn BufferSubData( &self, target: u32, offset: i64, data: ArrayBufferViewOrArrayBuffer )

source§

fn CompressedTexImage2D( &self, target: u32, level: i32, internal_format: u32, width: i32, height: i32, border: i32, data: CustomAutoRooterGuard<'_, ArrayBufferView> )

source§

fn CompressedTexSubImage2D( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, width: i32, height: i32, format: u32, data: CustomAutoRooterGuard<'_, ArrayBufferView> )

source§

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 )

source§

fn Clear(&self, mask: u32)

source§

fn ClearColor(&self, red: f32, green: f32, blue: f32, alpha: f32)

source§

fn ClearDepth(&self, depth: f32)

source§

fn ClearStencil(&self, stencil: i32)

source§

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

source§

fn CullFace(&self, mode: u32)

source§

fn FrontFace(&self, mode: u32)

source§

fn DepthFunc(&self, func: u32)

source§

fn DepthMask(&self, flag: bool)

source§

fn DepthRange(&self, near: f32, far: f32)

source§

fn Enable(&self, cap: u32)

source§

fn Disable(&self, cap: u32)

source§

fn CompileShader(&self, shader: &WebGLShader)

source§

fn CreateBuffer(&self) -> Option<Root<Dom<WebGLBuffer>>>

source§

fn CreateFramebuffer(&self) -> Option<Root<Dom<WebGLFramebuffer>>>

source§

fn CreateRenderbuffer(&self) -> Option<Root<Dom<WebGLRenderbuffer>>>

source§

fn CreateTexture(&self) -> Option<Root<Dom<WebGLTexture>>>

source§

fn CreateProgram(&self) -> Option<Root<Dom<WebGLProgram>>>

source§

fn CreateShader(&self, shader_type: u32) -> Option<Root<Dom<WebGLShader>>>

source§

fn DeleteBuffer(&self, buffer: Option<&WebGLBuffer>)

source§

fn DeleteFramebuffer(&self, framebuffer: Option<&WebGLFramebuffer>)

source§

fn DeleteRenderbuffer(&self, renderbuffer: Option<&WebGLRenderbuffer>)

source§

fn DeleteTexture(&self, texture: Option<&WebGLTexture>)

source§

fn DeleteProgram(&self, program: Option<&WebGLProgram>)

source§

fn DeleteShader(&self, shader: Option<&WebGLShader>)

source§

fn DrawArrays(&self, mode: u32, first: i32, count: i32)

source§

fn DrawElements(&self, mode: u32, count: i32, type_: u32, offset: i64)

source§

fn EnableVertexAttribArray(&self, attrib_id: u32)

source§

fn DisableVertexAttribArray(&self, attrib_id: u32)

source§

fn GetActiveUniform( &self, program: &WebGLProgram, index: u32 ) -> Option<Root<Dom<WebGLActiveInfo>>>

source§

fn GetActiveAttrib( &self, program: &WebGLProgram, index: u32 ) -> Option<Root<Dom<WebGLActiveInfo>>>

source§

fn GetAttribLocation(&self, program: &WebGLProgram, name: DOMString) -> i32

source§

fn GetFramebufferAttachmentParameter( &self, cx: SafeJSContext, target: u32, attachment: u32, pname: u32 ) -> JSVal

source§

fn GetRenderbufferParameter( &self, _cx: SafeJSContext, target: u32, pname: u32 ) -> JSVal

source§

fn GetProgramInfoLog(&self, program: &WebGLProgram) -> Option<DOMString>

source§

fn GetProgramParameter( &self, _: SafeJSContext, program: &WebGLProgram, param: u32 ) -> JSVal

source§

fn GetShaderInfoLog(&self, shader: &WebGLShader) -> Option<DOMString>

source§

fn GetShaderParameter( &self, _: SafeJSContext, shader: &WebGLShader, param: u32 ) -> JSVal

source§

fn GetShaderPrecisionFormat( &self, shader_type: u32, precision_type: u32 ) -> Option<Root<Dom<WebGLShaderPrecisionFormat>>>

source§

fn GetUniformLocation( &self, program: &WebGLProgram, name: DOMString ) -> Option<Root<Dom<WebGLUniformLocation>>>

source§

fn GetVertexAttrib(&self, cx: SafeJSContext, index: u32, param: u32) -> JSVal

source§

fn GetVertexAttribOffset(&self, index: u32, pname: u32) -> i64

source§

fn Hint(&self, target: u32, mode: u32)

source§

fn IsBuffer(&self, buffer: Option<&WebGLBuffer>) -> bool

source§

fn IsEnabled(&self, cap: u32) -> bool

source§

fn IsFramebuffer(&self, frame_buffer: Option<&WebGLFramebuffer>) -> bool

source§

fn IsProgram(&self, program: Option<&WebGLProgram>) -> bool

source§

fn IsRenderbuffer(&self, render_buffer: Option<&WebGLRenderbuffer>) -> bool

source§

fn IsShader(&self, shader: Option<&WebGLShader>) -> bool

source§

fn IsTexture(&self, texture: Option<&WebGLTexture>) -> bool

source§

fn LineWidth(&self, width: f32)

source§

fn PixelStorei(&self, param_name: u32, param_value: i32)

source§

fn PolygonOffset(&self, factor: f32, units: f32)

source§

fn ReadPixels( &self, x: i32, y: i32, width: i32, height: i32, format: u32, pixel_type: u32, pixels: CustomAutoRooterGuard<'_, Option<ArrayBufferView>> )

source§

fn SampleCoverage(&self, value: f32, invert: bool)

source§

fn Scissor(&self, x: i32, y: i32, width: i32, height: i32)

source§

fn StencilFunc(&self, func: u32, ref_: i32, mask: u32)

source§

fn StencilFuncSeparate(&self, face: u32, func: u32, ref_: i32, mask: u32)

source§

fn StencilMask(&self, mask: u32)

source§

fn StencilMaskSeparate(&self, face: u32, mask: u32)

source§

fn StencilOp(&self, fail: u32, zfail: u32, zpass: u32)

source§

fn StencilOpSeparate(&self, face: u32, fail: u32, zfail: u32, zpass: u32)

source§

fn LinkProgram(&self, program: &WebGLProgram)

source§

fn ShaderSource(&self, shader: &WebGLShader, source: DOMString)

source§

fn GetShaderSource(&self, shader: &WebGLShader) -> Option<DOMString>

source§

fn Uniform1f(&self, location: Option<&WebGLUniformLocation>, val: f32)

source§

fn Uniform1i(&self, location: Option<&WebGLUniformLocation>, val: i32)

source§

fn Uniform1iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence )

source§

fn Uniform1fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence )

source§

fn Uniform2f(&self, location: Option<&WebGLUniformLocation>, x: f32, y: f32)

source§

fn Uniform2fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence )

source§

fn Uniform2i(&self, location: Option<&WebGLUniformLocation>, x: i32, y: i32)

source§

fn Uniform2iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence )

source§

fn Uniform3f( &self, location: Option<&WebGLUniformLocation>, x: f32, y: f32, z: f32 )

source§

fn Uniform3fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence )

source§

fn Uniform3i( &self, location: Option<&WebGLUniformLocation>, x: i32, y: i32, z: i32 )

source§

fn Uniform3iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence )

source§

fn Uniform4i( &self, location: Option<&WebGLUniformLocation>, x: i32, y: i32, z: i32, w: i32 )

source§

fn Uniform4iv( &self, location: Option<&WebGLUniformLocation>, val: Int32ArrayOrLongSequence )

source§

fn Uniform4f( &self, location: Option<&WebGLUniformLocation>, x: f32, y: f32, z: f32, w: f32 )

source§

fn Uniform4fv( &self, location: Option<&WebGLUniformLocation>, val: Float32ArrayOrUnrestrictedFloatSequence )

source§

fn UniformMatrix2fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence )

source§

fn UniformMatrix3fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence )

source§

fn UniformMatrix4fv( &self, location: Option<&WebGLUniformLocation>, transpose: bool, val: Float32ArrayOrUnrestrictedFloatSequence )

source§

fn GetUniform( &self, cx: SafeJSContext, program: &WebGLProgram, location: &WebGLUniformLocation ) -> JSVal

source§

fn UseProgram(&self, program: Option<&WebGLProgram>)

source§

fn ValidateProgram(&self, program: &WebGLProgram)

source§

fn VertexAttrib1f(&self, indx: u32, x: f32)

source§

fn VertexAttrib1fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)

source§

fn VertexAttrib2f(&self, indx: u32, x: f32, y: f32)

source§

fn VertexAttrib2fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)

source§

fn VertexAttrib3f(&self, indx: u32, x: f32, y: f32, z: f32)

source§

fn VertexAttrib3fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)

source§

fn VertexAttrib4f(&self, indx: u32, x: f32, y: f32, z: f32, w: f32)

source§

fn VertexAttrib4fv(&self, indx: u32, v: Float32ArrayOrUnrestrictedFloatSequence)

source§

fn VertexAttribPointer( &self, index: u32, size: i32, type_: u32, normalized: bool, stride: i32, offset: i64 )

source§

fn Viewport(&self, x: i32, y: i32, width: i32, height: i32)

source§

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>

source§

fn TexImage2D_( &self, target: u32, level: i32, internal_format: i32, format: u32, data_type: u32, source: TexImageSource ) -> Result<(), Error>

source§

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>

source§

fn TexSubImage2D_( &self, target: u32, level: i32, xoffset: i32, yoffset: i32, format: u32, data_type: u32, source: TexImageSource ) -> Result<(), Error>

source§

fn TexParameterf(&self, target: u32, name: u32, value: f32)

source§

fn TexParameteri(&self, target: u32, name: u32, value: i32)

source§

fn CheckFramebufferStatus(&self, target: u32) -> u32

source§

fn RenderbufferStorage( &self, target: u32, internal_format: u32, width: i32, height: i32 )

source§

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 )

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> MaybeBoxed<Box<T, Global>> for T

source§

fn maybe_boxed(self) -> Box<T, Global>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

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

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

Performs the conversion.
source§

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

§

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

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

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

Performs the conversion.
source§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Erased for T