Skip to main content

WebGLRenderingContext

Struct WebGLRenderingContext 

Source
pub struct WebGLRenderingContext(/* private fields */);

Implementations§

Source§

impl WebGLRenderingContext

Source

pub const ACTIVE_ATTRIBUTES: GLenum = 35721

Source

pub const ACTIVE_TEXTURE: GLenum = 34016

Source

pub const ACTIVE_UNIFORMS: GLenum = 35718

Source

pub const ALIASED_LINE_WIDTH_RANGE: GLenum = 33902

Source

pub const ALIASED_POINT_SIZE_RANGE: GLenum = 33901

Source

pub const ALPHA: GLenum = 6406

Source

pub const ALPHA_BITS: GLenum = 3413

Source

pub const ALWAYS: GLenum = 519

Source

pub const ARRAY_BUFFER: GLenum = 34962

Source

pub const ARRAY_BUFFER_BINDING: GLenum = 34964

Source

pub const ATTACHED_SHADERS: GLenum = 35717

Source

pub const BACK: GLenum = 1029

Source

pub const BLEND: GLenum = 3042

Source

pub const BLEND_COLOR: GLenum = 32773

Source

pub const BLEND_DST_ALPHA: GLenum = 32970

Source

pub const BLEND_DST_RGB: GLenum = 32968

Source

pub const BLEND_EQUATION: GLenum = 32777

Source

pub const BLEND_EQUATION_ALPHA: GLenum = 34877

Source

pub const BLEND_EQUATION_RGB: GLenum = 32777

Source

pub const BLEND_SRC_ALPHA: GLenum = 32971

Source

pub const BLEND_SRC_RGB: GLenum = 32969

Source

pub const BLUE_BITS: GLenum = 3412

Source

pub const BOOL: GLenum = 35670

Source

pub const BOOL_VEC2: GLenum = 35671

Source

pub const BOOL_VEC3: GLenum = 35672

Source

pub const BOOL_VEC4: GLenum = 35673

Source

pub const BROWSER_DEFAULT_WEBGL: GLenum = 37444

Source

pub const BUFFER_SIZE: GLenum = 34660

Source

pub const BUFFER_USAGE: GLenum = 34661

Source

pub const BYTE: GLenum = 5120

Source

pub const CCW: GLenum = 2305

Source

pub const CLAMP_TO_EDGE: GLenum = 33071

Source

pub const COLOR_ATTACHMENT0: GLenum = 36064

Source

pub const COLOR_BUFFER_BIT: GLenum = 16384

Source

pub const COLOR_CLEAR_VALUE: GLenum = 3106

Source

pub const COLOR_WRITEMASK: GLenum = 3107

Source

pub const COMPILE_STATUS: GLenum = 35713

Source

pub const COMPRESSED_TEXTURE_FORMATS: GLenum = 34467

Source

pub const CONSTANT_ALPHA: GLenum = 32771

Source

pub const CONSTANT_COLOR: GLenum = 32769

Source

pub const CONTEXT_LOST_WEBGL: GLenum = 37442

Source

pub const CULL_FACE: GLenum = 2884

Source

pub const CULL_FACE_MODE: GLenum = 2885

Source

pub const CURRENT_PROGRAM: GLenum = 35725

Source

pub const CURRENT_VERTEX_ATTRIB: GLenum = 34342

Source

pub const CW: GLenum = 2304

Source

pub const DECR: GLenum = 7683

Source

pub const DECR_WRAP: GLenum = 34056

Source

pub const DELETE_STATUS: GLenum = 35712

Source

pub const DEPTH_ATTACHMENT: GLenum = 36096

Source

pub const DEPTH_BITS: GLenum = 3414

Source

pub const DEPTH_BUFFER_BIT: GLenum = 256

Source

pub const DEPTH_CLEAR_VALUE: GLenum = 2931

Source

pub const DEPTH_COMPONENT: GLenum = 6402

Source

pub const DEPTH_COMPONENT16: GLenum = 33189

Source

pub const DEPTH_FUNC: GLenum = 2932

Source

pub const DEPTH_RANGE: GLenum = 2928

Source

pub const DEPTH_STENCIL: GLenum = 34041

Source

pub const DEPTH_STENCIL_ATTACHMENT: GLenum = 33306

Source

pub const DEPTH_TEST: GLenum = 2929

Source

pub const DEPTH_WRITEMASK: GLenum = 2930

Source

pub const DITHER: GLenum = 3024

Source

pub const DONT_CARE: GLenum = 4352

Source

pub const DST_ALPHA: GLenum = 772

Source

pub const DST_COLOR: GLenum = 774

Source

pub const DYNAMIC_DRAW: GLenum = 35048

Source

pub const ELEMENT_ARRAY_BUFFER: GLenum = 34963

Source

pub const ELEMENT_ARRAY_BUFFER_BINDING: GLenum = 34965

Source

pub const EQUAL: GLenum = 514

Source

pub const FASTEST: GLenum = 4353

Source

pub const FLOAT: GLenum = 5126

Source

pub const FLOAT_MAT2: GLenum = 35674

Source

pub const FLOAT_MAT3: GLenum = 35675

Source

pub const FLOAT_MAT4: GLenum = 35676

Source

pub const FLOAT_VEC2: GLenum = 35664

Source

pub const FLOAT_VEC3: GLenum = 35665

Source

pub const FLOAT_VEC4: GLenum = 35666

Source

pub const FRAGMENT_SHADER: GLenum = 35632

Source

pub const FRAMEBUFFER: GLenum = 36160

Source

pub const FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum = 36049

Source

pub const FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum = 36048

Source

pub const FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum = 36051

Source

pub const FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum = 36050

Source

pub const FRAMEBUFFER_BINDING: GLenum = 36006

Source

pub const FRAMEBUFFER_COMPLETE: GLenum = 36053

Source

pub const FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum = 36054

Source

pub const FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum = 36057

Source

pub const FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum = 36055

Source

pub const FRAMEBUFFER_UNSUPPORTED: GLenum = 36061

Source

pub const FRONT: GLenum = 1028

Source

pub const FRONT_AND_BACK: GLenum = 1032

Source

pub const FRONT_FACE: GLenum = 2886

Source

pub const FUNC_ADD: GLenum = 32774

Source

pub const FUNC_REVERSE_SUBTRACT: GLenum = 32779

Source

pub const FUNC_SUBTRACT: GLenum = 32778

Source

pub const GENERATE_MIPMAP_HINT: GLenum = 33170

Source

pub const GEQUAL: GLenum = 518

Source

pub const GREATER: GLenum = 516

Source

pub const GREEN_BITS: GLenum = 3411

Source

pub const HIGH_FLOAT: GLenum = 36338

Source

pub const HIGH_INT: GLenum = 36341

Source

pub const IMPLEMENTATION_COLOR_READ_FORMAT: GLenum = 35739

Source

pub const IMPLEMENTATION_COLOR_READ_TYPE: GLenum = 35738

Source

pub const INCR: GLenum = 7682

Source

pub const INCR_WRAP: GLenum = 34055

Source

pub const INT: GLenum = 5124

Source

pub const INT_VEC2: GLenum = 35667

Source

pub const INT_VEC3: GLenum = 35668

Source

pub const INT_VEC4: GLenum = 35669

Source

pub const INVALID_ENUM: GLenum = 1280

Source

pub const INVALID_FRAMEBUFFER_OPERATION: GLenum = 1286

Source

pub const INVALID_OPERATION: GLenum = 1282

Source

pub const INVALID_VALUE: GLenum = 1281

Source

pub const INVERT: GLenum = 5386

Source

pub const KEEP: GLenum = 7680

Source

pub const LEQUAL: GLenum = 515

Source

pub const LESS: GLenum = 513

Source

pub const LINEAR: GLenum = 9729

Source

pub const LINEAR_MIPMAP_LINEAR: GLenum = 9987

Source

pub const LINEAR_MIPMAP_NEAREST: GLenum = 9985

Source

pub const LINES: GLenum = 1

Source

pub const LINE_LOOP: GLenum = 2

Source

pub const LINE_STRIP: GLenum = 3

Source

pub const LINE_WIDTH: GLenum = 2849

Source

pub const LOW_FLOAT: GLenum = 36336

Source

pub const LOW_INT: GLenum = 36339

Source

pub const LUMINANCE: GLenum = 6409

Source

pub const LUMINANCE_ALPHA: GLenum = 6410

Source

pub const MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum = 35661

Source

pub const MAX_CUBE_MAP_TEXTURE_SIZE: GLenum = 34076

Source

pub const MAX_FRAGMENT_UNIFORM_VECTORS: GLenum = 36349

Source

pub const MAX_RENDERBUFFER_SIZE: GLenum = 34024

Source

pub const MAX_TEXTURE_IMAGE_UNITS: GLenum = 34930

Source

pub const MAX_TEXTURE_SIZE: GLenum = 3379

Source

pub const MAX_VARYING_VECTORS: GLenum = 36348

Source

pub const MAX_VERTEX_ATTRIBS: GLenum = 34921

Source

pub const MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum = 35660

Source

pub const MAX_VERTEX_UNIFORM_VECTORS: GLenum = 36347

Source

pub const MAX_VIEWPORT_DIMS: GLenum = 3386

Source

pub const MEDIUM_FLOAT: GLenum = 36337

Source

pub const MEDIUM_INT: GLenum = 36340

Source

pub const MIRRORED_REPEAT: GLenum = 33648

Source

pub const NEAREST: GLenum = 9728

Source

pub const NEAREST_MIPMAP_LINEAR: GLenum = 9986

Source

pub const NEAREST_MIPMAP_NEAREST: GLenum = 9984

Source

pub const NEVER: GLenum = 512

Source

pub const NICEST: GLenum = 4354

Source

pub const NONE: GLenum = 0

Source

pub const NOTEQUAL: GLenum = 517

Source

pub const NO_ERROR: GLenum = 0

Source

pub const ONE: GLenum = 1

Source

pub const ONE_MINUS_CONSTANT_ALPHA: GLenum = 32772

Source

pub const ONE_MINUS_CONSTANT_COLOR: GLenum = 32770

Source

pub const ONE_MINUS_DST_ALPHA: GLenum = 773

Source

pub const ONE_MINUS_DST_COLOR: GLenum = 775

Source

pub const ONE_MINUS_SRC_ALPHA: GLenum = 771

Source

pub const ONE_MINUS_SRC_COLOR: GLenum = 769

Source

pub const OUT_OF_MEMORY: GLenum = 1285

Source

pub const PACK_ALIGNMENT: GLenum = 3333

Source

pub const POINTS: GLenum = 0

Source

pub const POLYGON_OFFSET_FACTOR: GLenum = 32824

Source

pub const POLYGON_OFFSET_FILL: GLenum = 32823

Source

pub const POLYGON_OFFSET_UNITS: GLenum = 10752

Source

pub const RED_BITS: GLenum = 3410

Source

pub const RENDERBUFFER: GLenum = 36161

Source

pub const RENDERBUFFER_ALPHA_SIZE: GLenum = 36179

Source

pub const RENDERBUFFER_BINDING: GLenum = 36007

Source

pub const RENDERBUFFER_BLUE_SIZE: GLenum = 36178

Source

pub const RENDERBUFFER_DEPTH_SIZE: GLenum = 36180

Source

pub const RENDERBUFFER_GREEN_SIZE: GLenum = 36177

Source

pub const RENDERBUFFER_HEIGHT: GLenum = 36163

Source

pub const RENDERBUFFER_INTERNAL_FORMAT: GLenum = 36164

Source

pub const RENDERBUFFER_RED_SIZE: GLenum = 36176

Source

pub const RENDERBUFFER_STENCIL_SIZE: GLenum = 36181

Source

pub const RENDERBUFFER_WIDTH: GLenum = 36162

Source

pub const RENDERER: GLenum = 7937

Source

pub const REPEAT: GLenum = 10497

Source

pub const REPLACE: GLenum = 7681

Source

pub const RGB: GLenum = 6407

Source

pub const RGB565: GLenum = 36194

Source

pub const RGB5_A1: GLenum = 32855

Source

pub const RGBA: GLenum = 6408

Source

pub const RGBA4: GLenum = 32854

Source

pub const SAMPLER_2D: GLenum = 35678

Source

pub const SAMPLER_CUBE: GLenum = 35680

Source

pub const SAMPLES: GLenum = 32937

Source

pub const SAMPLE_ALPHA_TO_COVERAGE: GLenum = 32926

Source

pub const SAMPLE_BUFFERS: GLenum = 32936

Source

pub const SAMPLE_COVERAGE: GLenum = 32928

Source

pub const SAMPLE_COVERAGE_INVERT: GLenum = 32939

Source

pub const SAMPLE_COVERAGE_VALUE: GLenum = 32938

Source

pub const SCISSOR_BOX: GLenum = 3088

Source

pub const SCISSOR_TEST: GLenum = 3089

Source

pub const SHADER_TYPE: GLenum = 35663

Source

pub const SHADING_LANGUAGE_VERSION: GLenum = 35724

Source

pub const SHORT: GLenum = 5122

Source

pub const SRC_ALPHA: GLenum = 770

Source

pub const SRC_ALPHA_SATURATE: GLenum = 776

Source

pub const SRC_COLOR: GLenum = 768

Source

pub const STATIC_DRAW: GLenum = 35044

Source

pub const STENCIL_ATTACHMENT: GLenum = 36128

Source

pub const STENCIL_BACK_FAIL: GLenum = 34817

Source

pub const STENCIL_BACK_FUNC: GLenum = 34816

Source

pub const STENCIL_BACK_PASS_DEPTH_FAIL: GLenum = 34818

Source

pub const STENCIL_BACK_PASS_DEPTH_PASS: GLenum = 34819

Source

pub const STENCIL_BACK_REF: GLenum = 36003

Source

pub const STENCIL_BACK_VALUE_MASK: GLenum = 36004

Source

pub const STENCIL_BACK_WRITEMASK: GLenum = 36005

Source

pub const STENCIL_BITS: GLenum = 3415

Source

pub const STENCIL_BUFFER_BIT: GLenum = 1024

Source

pub const STENCIL_CLEAR_VALUE: GLenum = 2961

Source

pub const STENCIL_FAIL: GLenum = 2964

Source

pub const STENCIL_FUNC: GLenum = 2962

Source

pub const STENCIL_INDEX8: GLenum = 36168

Source

pub const STENCIL_PASS_DEPTH_FAIL: GLenum = 2965

Source

pub const STENCIL_PASS_DEPTH_PASS: GLenum = 2966

Source

pub const STENCIL_REF: GLenum = 2967

Source

pub const STENCIL_TEST: GLenum = 2960

Source

pub const STENCIL_VALUE_MASK: GLenum = 2963

Source

pub const STENCIL_WRITEMASK: GLenum = 2968

Source

pub const STREAM_DRAW: GLenum = 35040

Source

pub const SUBPIXEL_BITS: GLenum = 3408

Source

pub const TEXTURE: GLenum = 5890

Source

pub const TEXTURE0: GLenum = 33984

Source

pub const TEXTURE1: GLenum = 33985

Source

pub const TEXTURE10: GLenum = 33994

Source

pub const TEXTURE11: GLenum = 33995

Source

pub const TEXTURE12: GLenum = 33996

Source

pub const TEXTURE13: GLenum = 33997

Source

pub const TEXTURE14: GLenum = 33998

Source

pub const TEXTURE15: GLenum = 33999

Source

pub const TEXTURE16: GLenum = 34000

Source

pub const TEXTURE17: GLenum = 34001

Source

pub const TEXTURE18: GLenum = 34002

Source

pub const TEXTURE19: GLenum = 34003

Source

pub const TEXTURE2: GLenum = 33986

Source

pub const TEXTURE20: GLenum = 34004

Source

pub const TEXTURE21: GLenum = 34005

Source

pub const TEXTURE22: GLenum = 34006

Source

pub const TEXTURE23: GLenum = 34007

Source

pub const TEXTURE24: GLenum = 34008

Source

pub const TEXTURE25: GLenum = 34009

Source

pub const TEXTURE26: GLenum = 34010

Source

pub const TEXTURE27: GLenum = 34011

Source

pub const TEXTURE28: GLenum = 34012

Source

pub const TEXTURE29: GLenum = 34013

Source

pub const TEXTURE3: GLenum = 33987

Source

pub const TEXTURE30: GLenum = 34014

Source

pub const TEXTURE31: GLenum = 34015

Source

pub const TEXTURE4: GLenum = 33988

Source

pub const TEXTURE5: GLenum = 33989

Source

pub const TEXTURE6: GLenum = 33990

Source

pub const TEXTURE7: GLenum = 33991

Source

pub const TEXTURE8: GLenum = 33992

Source

pub const TEXTURE9: GLenum = 33993

Source

pub const TEXTURE_2D: GLenum = 3553

Source

pub const TEXTURE_BINDING_2D: GLenum = 32873

Source

pub const TEXTURE_BINDING_CUBE_MAP: GLenum = 34068

Source

pub const TEXTURE_CUBE_MAP: GLenum = 34067

Source

pub const TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum = 34070

Source

pub const TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum = 34072

Source

pub const TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum = 34074

Source

pub const TEXTURE_CUBE_MAP_POSITIVE_X: GLenum = 34069

Source

pub const TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum = 34071

Source

pub const TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum = 34073

Source

pub const TEXTURE_MAG_FILTER: GLenum = 10240

Source

pub const TEXTURE_MIN_FILTER: GLenum = 10241

Source

pub const TEXTURE_WRAP_S: GLenum = 10242

Source

pub const TEXTURE_WRAP_T: GLenum = 10243

Source

pub const TRIANGLES: GLenum = 4

Source

pub const TRIANGLE_FAN: GLenum = 6

Source

pub const TRIANGLE_STRIP: GLenum = 5

Source

pub const UNPACK_ALIGNMENT: GLenum = 3317

Source

pub const UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum = 37443

Source

pub const UNPACK_FLIP_Y_WEBGL: GLenum = 37440

Source

pub const UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum = 37441

Source

pub const UNSIGNED_BYTE: GLenum = 5121

Source

pub const UNSIGNED_INT: GLenum = 5125

Source

pub const UNSIGNED_SHORT: GLenum = 5123

Source

pub const UNSIGNED_SHORT_4_4_4_4: GLenum = 32819

Source

pub const UNSIGNED_SHORT_5_5_5_1: GLenum = 32820

Source

pub const UNSIGNED_SHORT_5_6_5: GLenum = 33635

Source

pub const VALIDATE_STATUS: GLenum = 35715

Source

pub const VENDOR: GLenum = 7936

Source

pub const VERSION: GLenum = 7938

Source

pub const VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum = 34975

Source

pub const VERTEX_ATTRIB_ARRAY_ENABLED: GLenum = 34338

Source

pub const VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum = 34922

Source

pub const VERTEX_ATTRIB_ARRAY_POINTER: GLenum = 34373

Source

pub const VERTEX_ATTRIB_ARRAY_SIZE: GLenum = 34339

Source

pub const VERTEX_ATTRIB_ARRAY_STRIDE: GLenum = 34340

Source

pub const VERTEX_ATTRIB_ARRAY_TYPE: GLenum = 34341

Source

pub const VERTEX_SHADER: GLenum = 35633

Source

pub const VIEWPORT: GLenum = 2978

Source

pub const ZERO: GLenum = 0

Source

pub fn active_texture(&self, texture: GLenum)

Source

pub fn attach_shader(&self, program: &WebGLProgram, shader: &WebGLShader)

Source

pub fn bind_attrib_location( &self, program: &WebGLProgram, index: GLuint, name: &str, )

Source

pub fn bind_buffer(&self, target: GLenum, buffer: Option<&WebGLBuffer>)

Source

pub fn bind_framebuffer( &self, target: GLenum, framebuffer: Option<&WebGLFramebuffer>, )

Source

pub fn bind_renderbuffer( &self, target: GLenum, renderbuffer: Option<&WebGLRenderbuffer>, )

Source

pub fn bind_texture(&self, target: GLenum, texture: Option<&WebGLTexture>)

Source

pub fn blend_color( &self, red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf, )

Source

pub fn blend_equation(&self, mode: GLenum)

Source

pub fn blend_equation_separate(&self, mode_rgb: GLenum, mode_alpha: GLenum)

Source

pub fn blend_func(&self, sfactor: GLenum, dfactor: GLenum)

Source

pub fn blend_func_separate( &self, src_rgb: GLenum, dst_rgb: GLenum, src_alpha: GLenum, dst_alpha: GLenum, )

Source

pub fn buffer_data(&self, target: GLenum, size: GLsizeiptr, usage: GLenum)

Source

pub fn buffer_data_1( &self, target: GLenum, data: Option<&ArrayBuffer>, usage: GLenum, )

Source

pub fn buffer_sub_data( &self, target: GLenum, offset: GLintptr, data: &ArrayBuffer, )

Source

pub fn canvas(&self) -> CanvasElement

Source

pub fn check_framebuffer_status(&self, target: GLenum) -> GLenum

Source

pub fn clear(&self, mask: GLbitfield)

Source

pub fn clear_color( &self, red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf, )

Source

pub fn clear_depth(&self, depth: GLclampf)

Source

pub fn clear_stencil(&self, s: GLint)

Source

pub fn color_mask( &self, red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean, )

Source

pub fn compile_shader(&self, shader: &WebGLShader)

Source

pub fn compressed_tex_image2_d<'a0, T0>( &self, target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: T0, )
where T0: AsArrayBufferView<'a0>,

Source

pub fn compressed_tex_sub_image2_d<'a0, T0>( &self, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: T0, )
where T0: AsArrayBufferView<'a0>,

Source

pub fn copy_tex_image2_d( &self, target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint, )

Source

pub fn copy_tex_sub_image2_d( &self, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei, )

Source

pub fn create_buffer(&self) -> Option<WebGLBuffer>

Source

pub fn create_framebuffer(&self) -> Option<WebGLFramebuffer>

Source

pub fn create_program(&self) -> Option<WebGLProgram>

Source

pub fn create_renderbuffer(&self) -> Option<WebGLRenderbuffer>

Source

pub fn create_shader(&self, type_: GLenum) -> Option<WebGLShader>

Source

pub fn create_texture(&self) -> Option<WebGLTexture>

Source

pub fn cull_face(&self, mode: GLenum)

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub fn depth_func(&self, func: GLenum)

Source

pub fn depth_mask(&self, flag: GLboolean)

Source

pub fn depth_range(&self, z_near: GLclampf, z_far: GLclampf)

Source

pub fn detach_shader(&self, program: &WebGLProgram, shader: &WebGLShader)

Source

pub fn disable(&self, cap: GLenum)

Source

pub fn disable_vertex_attrib_array(&self, index: GLuint)

Source

pub fn draw_arrays(&self, mode: GLenum, first: GLint, count: GLsizei)

Source

pub fn draw_elements( &self, mode: GLenum, count: GLsizei, type_: GLenum, offset: GLintptr, )

Source

pub fn drawing_buffer_height(&self) -> GLsizei

Source

pub fn drawing_buffer_width(&self) -> GLsizei

Source

pub fn enable(&self, cap: GLenum)

Source

pub fn enable_vertex_attrib_array(&self, index: GLuint)

Source

pub fn finish(&self)

Source

pub fn flush(&self)

Source

pub fn framebuffer_renderbuffer( &self, target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: Option<&WebGLRenderbuffer>, )

Source

pub fn framebuffer_texture2_d( &self, target: GLenum, attachment: GLenum, textarget: GLenum, texture: Option<&WebGLTexture>, level: GLint, )

Source

pub fn front_face(&self, mode: GLenum)

Source

pub fn generate_mipmap(&self, target: GLenum)

Source

pub fn get_active_attrib( &self, program: &WebGLProgram, index: GLuint, ) -> Option<WebGLActiveInfo>

Source

pub fn get_active_uniform( &self, program: &WebGLProgram, index: GLuint, ) -> Option<WebGLActiveInfo>

Source

pub fn get_attached_shaders( &self, program: &WebGLProgram, ) -> Option<Vec<WebGLShader>>

Source

pub fn get_attrib_location(&self, program: &WebGLProgram, name: &str) -> GLint

Source

pub fn get_buffer_parameter(&self, target: GLenum, pname: GLenum) -> Value

Source

pub fn get_context_attributes(&self) -> Option<WebGLContextAttributes>

Source

pub fn get_error(&self) -> GLenum

Source

pub fn get_extension<E: Extension>(&self) -> Option<E>

Source

pub fn get_framebuffer_attachment_parameter( &self, target: GLenum, attachment: GLenum, pname: GLenum, ) -> Value

Source

pub fn get_parameter(&self, pname: GLenum) -> Value

Source

pub fn get_program_info_log(&self, program: &WebGLProgram) -> Option<String>

Source

pub fn get_program_parameter( &self, program: &WebGLProgram, pname: GLenum, ) -> Value

Source

pub fn get_renderbuffer_parameter(&self, target: GLenum, pname: GLenum) -> Value

Source

pub fn get_shader_info_log(&self, shader: &WebGLShader) -> Option<String>

Source

pub fn get_shader_parameter(&self, shader: &WebGLShader, pname: GLenum) -> Value

Source

pub fn get_shader_precision_format( &self, shadertype: GLenum, precisiontype: GLenum, ) -> Option<WebGLShaderPrecisionFormat>

Source

pub fn get_shader_source(&self, shader: &WebGLShader) -> Option<String>

Source

pub fn get_supported_extensions(&self) -> Option<Vec<String>>

Source

pub fn get_tex_parameter(&self, target: GLenum, pname: GLenum) -> Value

Source

pub fn get_uniform( &self, program: &WebGLProgram, location: &WebGLUniformLocation, ) -> Value

Source

pub fn get_uniform_location( &self, program: &WebGLProgram, name: &str, ) -> Option<WebGLUniformLocation>

Source

pub fn get_vertex_attrib(&self, index: GLuint, pname: GLenum) -> Value

Source

pub fn get_vertex_attrib_offset(&self, index: GLuint, pname: GLenum) -> GLintptr

Source

pub fn hint(&self, target: GLenum, mode: GLenum)

Source

pub fn is_buffer(&self, buffer: Option<&WebGLBuffer>) -> GLboolean

Source

pub fn is_context_lost(&self) -> bool

Source

pub fn is_enabled(&self, cap: GLenum) -> GLboolean

Source

pub fn is_framebuffer( &self, framebuffer: Option<&WebGLFramebuffer>, ) -> GLboolean

Source

pub fn is_program(&self, program: Option<&WebGLProgram>) -> GLboolean

Source

pub fn is_renderbuffer( &self, renderbuffer: Option<&WebGLRenderbuffer>, ) -> GLboolean

Source

pub fn is_shader(&self, shader: Option<&WebGLShader>) -> GLboolean

Source

pub fn is_texture(&self, texture: Option<&WebGLTexture>) -> GLboolean

Source

pub fn line_width(&self, width: GLfloat)

Source

pub fn pixel_storei(&self, pname: GLenum, param: GLint)

Source

pub fn polygon_offset(&self, factor: GLfloat, units: GLfloat)

Source

pub fn read_pixels<'a0, T0>( &self, x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type_: GLenum, pixels: Option<T0>, )
where T0: AsArrayBufferView<'a0>,

Source

pub fn renderbuffer_storage( &self, target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei, )

Source

pub fn sample_coverage(&self, value: GLclampf, invert: GLboolean)

Source

pub fn scissor(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei)

Source

pub fn shader_source(&self, shader: &WebGLShader, source: &str)

Source

pub fn stencil_func(&self, func: GLenum, ref_: GLint, mask: GLuint)

Source

pub fn stencil_func_separate( &self, face: GLenum, func: GLenum, ref_: GLint, mask: GLuint, )

Source

pub fn stencil_mask(&self, mask: GLuint)

Source

pub fn stencil_mask_separate(&self, face: GLenum, mask: GLuint)

Source

pub fn stencil_op(&self, fail: GLenum, zfail: GLenum, zpass: GLenum)

Source

pub fn stencil_op_separate( &self, face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum, )

Source

pub fn tex_image2_d<'a0, T0>( &self, target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type_: GLenum, pixels: Option<T0>, )
where T0: AsArrayBufferView<'a0>,

Source

pub fn tex_image2_d_1<T0>( &self, target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type_: GLenum, source: T0, )
where T0: JsSerialize,

Source

pub fn tex_parameterf(&self, target: GLenum, pname: GLenum, param: GLfloat)

Source

pub fn tex_parameteri(&self, target: GLenum, pname: GLenum, param: GLint)

Source

pub fn tex_sub_image2_d<'a0, T0>( &self, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type_: GLenum, pixels: Option<T0>, )
where T0: AsArrayBufferView<'a0>,

Source

pub fn tex_sub_image2_d_1<T0>( &self, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type_: GLenum, source: T0, )
where T0: JsSerialize,

Source

pub fn uniform1f(&self, location: Option<&WebGLUniformLocation>, x: GLfloat)

Source

pub fn uniform1fv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, v: T0, )
where T0: AsTypedArray<'a0, f32>,

Source

pub fn uniform1i(&self, location: Option<&WebGLUniformLocation>, x: GLint)

Source

pub fn uniform1iv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, v: T0, )
where T0: AsTypedArray<'a0, i32>,

Source

pub fn uniform2f( &self, location: Option<&WebGLUniformLocation>, x: GLfloat, y: GLfloat, )

Source

pub fn uniform2fv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, v: T0, )
where T0: AsTypedArray<'a0, f32>,

Source

pub fn uniform2i( &self, location: Option<&WebGLUniformLocation>, x: GLint, y: GLint, )

Source

pub fn uniform2iv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, v: T0, )
where T0: AsTypedArray<'a0, i32>,

Source

pub fn uniform3f( &self, location: Option<&WebGLUniformLocation>, x: GLfloat, y: GLfloat, z: GLfloat, )

Source

pub fn uniform3fv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, v: T0, )
where T0: AsTypedArray<'a0, f32>,

Source

pub fn uniform3i( &self, location: Option<&WebGLUniformLocation>, x: GLint, y: GLint, z: GLint, )

Source

pub fn uniform3iv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, v: T0, )
where T0: AsTypedArray<'a0, i32>,

Source

pub fn uniform4f( &self, location: Option<&WebGLUniformLocation>, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat, )

Source

pub fn uniform4fv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, v: T0, )
where T0: AsTypedArray<'a0, f32>,

Source

pub fn uniform4i( &self, location: Option<&WebGLUniformLocation>, x: GLint, y: GLint, z: GLint, w: GLint, )

Source

pub fn uniform4iv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, v: T0, )
where T0: AsTypedArray<'a0, i32>,

Source

pub fn uniform_matrix2fv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, transpose: GLboolean, value: T0, )
where T0: AsTypedArray<'a0, f32>,

Source

pub fn uniform_matrix3fv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, transpose: GLboolean, value: T0, )
where T0: AsTypedArray<'a0, f32>,

Source

pub fn uniform_matrix4fv<'a0, T0>( &self, location: Option<&WebGLUniformLocation>, transpose: GLboolean, value: T0, )
where T0: AsTypedArray<'a0, f32>,

Source

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

Source

pub fn validate_program(&self, program: &WebGLProgram)

Source

pub fn vertex_attrib1f(&self, index: GLuint, x: GLfloat)

Source

pub fn vertex_attrib1fv<'a0, T0>(&self, index: GLuint, values: T0)
where T0: AsTypedArray<'a0, f32>,

Source

pub fn vertex_attrib2f(&self, index: GLuint, x: GLfloat, y: GLfloat)

Source

pub fn vertex_attrib2fv<'a0, T0>(&self, index: GLuint, values: T0)
where T0: AsTypedArray<'a0, f32>,

Source

pub fn vertex_attrib3f(&self, index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat)

Source

pub fn vertex_attrib3fv<'a0, T0>(&self, index: GLuint, values: T0)
where T0: AsTypedArray<'a0, f32>,

Source

pub fn vertex_attrib4f( &self, index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat, )

Source

pub fn vertex_attrib4fv<'a0, T0>(&self, index: GLuint, values: T0)
where T0: AsTypedArray<'a0, f32>,

Source

pub fn vertex_attrib_pointer( &self, index: GLuint, size: GLint, type_: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr, )

Source

pub fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei)

Trait Implementations§

Source§

impl AsRef<Reference> for WebGLRenderingContext

Source§

fn as_ref(&self) -> &Reference

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for WebGLRenderingContext

Source§

fn clone(&self) -> WebGLRenderingContext

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WebGLRenderingContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<WebGLRenderingContext> for Reference

Source§

fn from(value: WebGLRenderingContext) -> Self

Converts to this type from the input type.
Source§

impl InstanceOf for WebGLRenderingContext

Source§

fn instance_of(reference: &Reference) -> bool

Checks whenever a given Reference if of type Self.
Source§

impl ReferenceType for WebGLRenderingContext

Source§

unsafe fn from_reference_unchecked(reference: Reference) -> Self

Converts a given reference into a concrete reference-like wrapper. Doesn’t do any type checking; highly unsafe to use!
Source§

impl RenderingContext for WebGLRenderingContext

Source§

type Error = <Reference as TryFrom<Value>>::Error

Type of error which can occur whilst creating this context
Source§

fn from_canvas( canvas: &CanvasElement, ) -> Result<Self, <Reference as TryFrom<Value>>::Error>

Name which identifies this kind of rendering context.
Source§

impl<'_r> TryFrom<&'_r Reference> for WebGLRenderingContext

Source§

type Error = ConversionError

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

fn try_from(reference: &Reference) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'_r> TryFrom<&'_r Value> for WebGLRenderingContext

Source§

type Error = ConversionError

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

fn try_from(value: &Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Reference> for WebGLRenderingContext

Source§

type Error = ConversionError

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

fn try_from(reference: Reference) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for WebGLRenderingContext

Source§

type Error = ConversionError

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

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<WebGLRenderingContext> for Reference

Source§

type Error = Void

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

fn try_from(value: WebGLRenderingContext) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl JsSerialize for WebGLRenderingContext

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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.