WebGLRenderingContext

WebGLRenderingContext objects expose the WebGLRenderingContext interface, the principal interface in WebGL which provides special properties and methods to manipulate the 3D content rendered in an HTML canvas element.

Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

final implicit class WebGLRenderingContextOps(webGL: WebGLRenderingContext) extends AnyVal

Value members

Concrete fields

final val ACTIVE_ATTRIBUTES: 35721
final val ACTIVE_TEXTURE: 34016

The currently active texture unit.

The currently active texture unit.

final val ACTIVE_UNIFORMS: 35718
final val ALIASED_LINE_WIDTH_RANGE: 33902
final val ALIASED_POINT_SIZE_RANGE: 33901
final val ALPHA: 6406
final val ALPHA_BITS: 3413
final val ALWAYS: 519
final val ARRAY_BUFFER: 34962
final val ARRAY_BUFFER_BINDING: 34964
final val ATTACHED_SHADERS: 35717
final val BACK: 1029

Specifies back faces.

Specifies back faces.

final val BLEND: 3042

Capability to enable/disable blending.

Capability to enable/disable blending.

final val BLEND_COLOR: 32773
final val BLEND_DST_ALPHA: 32970
final val BLEND_DST_RGB: 32968
final val BLEND_EQUATION: 32777
final val BLEND_EQUATION_ALPHA: 34877
final val BLEND_EQUATION_RGB: 32777
final val BLEND_SRC_ALPHA: 32971
final val BLEND_SRC_RGB: 32969
final val BLUE_BITS: 3412
final val BOOL: 35670
final val BOOL_VEC2: 35671
final val BOOL_VEC3: 35672
final val BOOL_VEC4: 35673
final val BROWSER_DEFAULT_WEBGL: 37444
final val BUFFER_SIZE: 34660
final val BUFFER_USAGE: 34661
final val BYTE: 5120
final val CCW: 2305

Counter-Clockwise wound triangles are front-facing.

Counter-Clockwise wound triangles are front-facing.

final val CLAMP_TO_EDGE: 33071

Clamp the texture along this axis. The colour of the edge pixels will be replicated to infinity.

Clamp the texture along this axis. The colour of the edge pixels will be replicated to infinity.

final val COLOR_ATTACHMENT0: 36064
final val COLOR_BUFFER_BIT: 16384

Specifies the color buffer should be cleared.

Specifies the color buffer should be cleared.

See also:
final val COLOR_CLEAR_VALUE: 3106
final val COLOR_WRITEMASK: 3107
final val COMPILE_STATUS: 35713
final val CONSTANT_ALPHA: 32771
final val CONSTANT_COLOR: 32769
final val CONTEXT_LOST_WEBGL: 37442
final val CULL_FACE: 2884

Capability to enable/disable backface culling.

Capability to enable/disable backface culling.

final val CULL_FACE_MODE: 2885
final val CURRENT_PROGRAM: 35725
final val CURRENT_VERTEX_ATTRIB: 34342
final val CW: 2304

Clockwise wound triangles are front-facing.

Clockwise wound triangles are front-facing.

final val DECR: 7683
final val DECR_WRAP: 34056
final val DELETE_STATUS: 35712
final val DEPTH_ATTACHMENT: 36096
final val DEPTH_BITS: 3414
final val DEPTH_BUFFER_BIT: 256

Specifies the depth buffer should be cleared.

Specifies the depth buffer should be cleared.

See also:
final val DEPTH_CLEAR_VALUE: 2931
final val DEPTH_COMPONENT: 6402
final val DEPTH_COMPONENT16: 33189
final val DEPTH_FUNC: 2932
final val DEPTH_RANGE: 2928
final val DEPTH_STENCIL: 34041
final val DEPTH_STENCIL_ATTACHMENT: 33306
final val DEPTH_TEST: 2929

Capability to enable/disable the depth test.

Capability to enable/disable the depth test.

final val DEPTH_WRITEMASK: 2930
final val DITHER: 3024

Capability to enable/disable dithering.

Capability to enable/disable dithering.

final val DONT_CARE: 4352
final val DST_ALPHA: 772
final val DST_COLOR: 774
final val DYNAMIC_DRAW: 35048
final val ELEMENT_ARRAY_BUFFER: 34963
final val EQUAL: 514
final val FASTEST: 4353
final val FLOAT: 5126
final val FLOAT_MAT2: 35674
final val FLOAT_MAT3: 35675
final val FLOAT_MAT4: 35676
final val FLOAT_VEC2: 35664
final val FLOAT_VEC3: 35665
final val FLOAT_VEC4: 35666
final val FRAGMENT_SHADER: 35632
final val FRAMEBUFFER: 36160

The framebuffer target.

The framebuffer target.

final val FRAMEBUFFER_BINDING: 36006
final val FRAMEBUFFER_COMPLETE: 36053
final val FRAMEBUFFER_UNSUPPORTED: 36061
final val FRONT: 1028

Specifies front faces.

Specifies front faces.

final val FRONT_AND_BACK: 1032

Specifies both front and back faces.

Specifies both front and back faces.

final val FRONT_FACE: 2886
final val FUNC_ADD: 32774
final val FUNC_REVERSE_SUBTRACT: 32779
final val FUNC_SUBTRACT: 32778
final val GENERATE_MIPMAP_HINT: 33170
final val GEQUAL: 518
final val GREATER: 516
final val GREEN_BITS: 3411
final val HIGH_FLOAT: 36338

Specifies a high precision float.

Specifies a high precision float.

final val HIGH_INT: 36341

Specifies a high precision float.

Specifies a high precision float.

final val INCR: 7682
final val INCR_WRAP: 34055
final val INT: 5124
final val INT_VEC2: 35667
final val INT_VEC3: 35668
final val INT_VEC4: 35669
final val INVALID_ENUM: 1280

An invalid enumerated name has been passed to an API function.

An invalid enumerated name has been passed to an API function.

final val INVALID_OPERATION: 1282

The requested operation is not valid.

The requested operation is not valid.

final val INVALID_VALUE: 1281

An invalid value has been passed to an API function.

An invalid value has been passed to an API function.

final val INVERT: 5386
final val KEEP: 7680
final val LEQUAL: 515
final val LESS: 513
final val LINEAR: 9729

Specifies linear interpolation.

Specifies linear interpolation.

final val LINEAR_MIPMAP_LINEAR: 9987

Specifies linear interpolation linearly blending between mipmap levels.

Specifies linear interpolation linearly blending between mipmap levels.

final val LINEAR_MIPMAP_NEAREST: 9985

Specifies linear interpolation on the nearest mipmap level.

Specifies linear interpolation on the nearest mipmap level.

final val LINES: 1

Specifies the elements should be drawn as lines.

Specifies the elements should be drawn as lines.

See also:
final val LINE_LOOP: 2

Specifies the elements should be drawn as a line loop.

Specifies the elements should be drawn as a line loop.

See also:
final val LINE_STRIP: 3

Specifies the elements should be drawn as a line strip.

Specifies the elements should be drawn as a line strip.

See also:
final val LINE_WIDTH: 2849
final val LOW_FLOAT: 36336

Specifies a low precision float.

Specifies a low precision float.

final val LOW_INT: 36339

Specifies a low precision integer.

Specifies a low precision integer.

final val LUMINANCE: 6409
final val LUMINANCE_ALPHA: 6410
final val MAX_CUBE_MAP_TEXTURE_SIZE: 34076
final val MAX_RENDERBUFFER_SIZE: 34024
final val MAX_TEXTURE_IMAGE_UNITS: 34930
final val MAX_TEXTURE_SIZE: 3379
final val MAX_VARYING_VECTORS: 36348
final val MAX_VERTEX_ATTRIBS: 34921
final val MAX_VIEWPORT_DIMS: 3386
final val MEDIUM_FLOAT: 36337

Specifies a medium precision float.

Specifies a medium precision float.

final val MEDIUM_INT: 36340

Specifies a medium precision float.

Specifies a medium precision float.

final val MIRRORED_REPEAT: 33648

Repeat the texture along this axis, mirroring it each step.

Repeat the texture along this axis, mirroring it each step.

final val NEAREST: 9728

Specifies nearest neighbour interpolation.

Specifies nearest neighbour interpolation.

final val NEAREST_MIPMAP_LINEAR: 9986

Specifies nearest neighbour interpolation, linearly blending between mipmap levels.

Specifies nearest neighbour interpolation, linearly blending between mipmap levels.

final val NEAREST_MIPMAP_NEAREST: 9984

Specifies nearest neighbour interpolation on the nearest mipmap level.

Specifies nearest neighbour interpolation on the nearest mipmap level.

final val NEVER: 512
final val NICEST: 4354
final val NONE: 0
final val NOTEQUAL: 517
final val NO_ERROR: 0

No error has occurred.

No error has occurred.

final val ONE: 1
final val ONE_MINUS_CONSTANT_ALPHA: 32772
final val ONE_MINUS_CONSTANT_COLOR: 32770
final val ONE_MINUS_DST_ALPHA: 773
final val ONE_MINUS_DST_COLOR: 775
final val ONE_MINUS_SRC_ALPHA: 771
final val ONE_MINUS_SRC_COLOR: 769
final val OUT_OF_MEMORY: 1285

The operation requested could not be completed because it ran out of memory.

The operation requested could not be completed because it ran out of memory.

final val PACK_ALIGNMENT: 3333
final val POINTS: 0

Specifies the elements should be drawn as points.

Specifies the elements should be drawn as points.

See also:
final val POLYGON_OFFSET_FACTOR: 32824
final val POLYGON_OFFSET_FILL: 32823

Capability to enable/disable polygon offset.

Capability to enable/disable polygon offset.

final val POLYGON_OFFSET_UNITS: 10752
final val RED_BITS: 3410
final val RENDERBUFFER: 36161

The renderbuffer target.

The renderbuffer target.

final val RENDERBUFFER_ALPHA_SIZE: 36179
final val RENDERBUFFER_BINDING: 36007
final val RENDERBUFFER_BLUE_SIZE: 36178
final val RENDERBUFFER_DEPTH_SIZE: 36180
final val RENDERBUFFER_GREEN_SIZE: 36177
final val RENDERBUFFER_HEIGHT: 36163
final val RENDERBUFFER_RED_SIZE: 36176
final val RENDERBUFFER_STENCIL_SIZE: 36181
final val RENDERBUFFER_WIDTH: 36162
final val RENDERER: 7937
final val REPEAT: 10497

Repeat the texture along this axis.

Repeat the texture along this axis.

final val REPLACE: 7681
final val RGB: 6407
final val RGB565: 36194
final val RGB5_A1: 32855
final val RGBA: 6408
final val RGBA4: 32854
final val SAMPLER_2D: 35678
final val SAMPLER_CUBE: 35680
final val SAMPLES: 32937
final val SAMPLE_ALPHA_TO_COVERAGE: 32926
final val SAMPLE_BUFFERS: 32936
final val SAMPLE_COVERAGE: 32928
final val SAMPLE_COVERAGE_INVERT: 32939
final val SAMPLE_COVERAGE_VALUE: 32938
final val SCISSOR_BOX: 3088
final val SCISSOR_TEST: 3089

Capability to enable/disable the scissor test.

Capability to enable/disable the scissor test.

final val SHADER_TYPE: 35663
final val SHADING_LANGUAGE_VERSION: 35724
final val SHORT: 5122
final val SRC_ALPHA: 770
final val SRC_ALPHA_SATURATE: 776
final val SRC_COLOR: 768
final val STATIC_DRAW: 35044
final val STENCIL_ATTACHMENT: 36128
final val STENCIL_BACK_FAIL: 34817
final val STENCIL_BACK_FUNC: 34816
final val STENCIL_BACK_REF: 36003
final val STENCIL_BACK_VALUE_MASK: 36004
final val STENCIL_BACK_WRITEMASK: 36005
final val STENCIL_BITS: 3415
final val STENCIL_BUFFER_BIT: 1024

Specifies the stencil buffer should be cleared.

Specifies the stencil buffer should be cleared.

See also:
final val STENCIL_CLEAR_VALUE: 2961
final val STENCIL_FAIL: 2964
final val STENCIL_FUNC: 2962
final val STENCIL_INDEX: 6401
final val STENCIL_INDEX8: 36168
final val STENCIL_PASS_DEPTH_FAIL: 2965
final val STENCIL_PASS_DEPTH_PASS: 2966
final val STENCIL_REF: 2967
final val STENCIL_TEST: 2960

Capability to enable/disable the stencil test.

Capability to enable/disable the stencil test.

final val STENCIL_VALUE_MASK: 2963
final val STENCIL_WRITEMASK: 2968
final val STREAM_DRAW: 35040
final val SUBPIXEL_BITS: 3408
final val TEXTURE: 5890
final val TEXTURE0: 33984

Identifies texture unit 0. This texture unit is guaranteed to exist.

Identifies texture unit 0. This texture unit is guaranteed to exist.

final val TEXTURE1: 33985

Identifies texture unit 1. This texture unit is guaranteed to exist.

Identifies texture unit 1. This texture unit is guaranteed to exist.

final val TEXTURE10: 33994

Identifies texture unit 10. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 10. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE11: 33995

Identifies texture unit 11. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 11. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE12: 33996

Identifies texture unit 12. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 12. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE13: 33997

Identifies texture unit 13. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 13. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE14: 33998

Identifies texture unit 14. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 14. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE15: 33999

Identifies texture unit 15. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 15. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE16: 34000

Identifies texture unit 16. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 16. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE17: 34001

Identifies texture unit 17. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 17. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE18: 34002

Identifies texture unit 18. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 18. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE19: 34003

Identifies texture unit 19. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 19. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE2: 33986

Identifies texture unit 2. This texture unit is guaranteed to exist.

Identifies texture unit 2. This texture unit is guaranteed to exist.

final val TEXTURE20: 34004

Identifies texture unit 20. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 20. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE21: 34005

Identifies texture unit 21. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 21. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE22: 34006

Identifies texture unit 22. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 22. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE23: 34007

Identifies texture unit 23. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 23. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE24: 34008

Identifies texture unit 24. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 24. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE25: 34009

Identifies texture unit 25. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 25. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE26: 34010

Identifies texture unit 26. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 26. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE27: 34011

Identifies texture unit 27. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 27. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE28: 34012

Identifies texture unit 28. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 28. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE29: 34013

Identifies texture unit 29. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 29. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE3: 33987

Identifies texture unit 3. This texture unit is guaranteed to exist.

Identifies texture unit 3. This texture unit is guaranteed to exist.

final val TEXTURE30: 34014

Identifies texture unit 30. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 30. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE31: 34015

Identifies texture unit 31. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 31. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE4: 33988

Identifies texture unit 4. This texture unit is guaranteed to exist.

Identifies texture unit 4. This texture unit is guaranteed to exist.

final val TEXTURE5: 33989

Identifies texture unit 5. This texture unit is guaranteed to exist.

Identifies texture unit 5. This texture unit is guaranteed to exist.

final val TEXTURE6: 33990

Identifies texture unit 6. This texture unit is guaranteed to exist.

Identifies texture unit 6. This texture unit is guaranteed to exist.

final val TEXTURE7: 33991

Identifies texture unit 7. This texture unit is guaranteed to exist.

Identifies texture unit 7. This texture unit is guaranteed to exist.

final val TEXTURE8: 33992

Identifies texture unit 8. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 8. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE9: 33993

Identifies texture unit 9. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

Identifies texture unit 9. This texture unit ''may not exist in a given implementation''. You should examine MAX_COMBINED_TEXTURE_IMAGE_UNITS before using it.

final val TEXTURE_2D: 3553

The target for a simple 2 dimensional texture.

The target for a simple 2 dimensional texture.

final val TEXTURE_BINDING_2D: 32873
final val TEXTURE_BINDING_CUBE_MAP: 34068
final val TEXTURE_CUBE_MAP: 34067

The target for a cube mapped texture.

The target for a cube mapped texture.

final val TEXTURE_MAG_FILTER: 10240

The texture magnification filter.

The texture magnification filter.

Can be one of NEAREST or LINEAR.

final val TEXTURE_MIN_FILTER: 10241

The texture minification filter.

final val TEXTURE_WRAP_S: 10242

The horizontal texture wrap mode.

The horizontal texture wrap mode.

Can be one of REPEAT, CLAMP_TO_EDGE, MIRRORED_REPEAT.

final val TEXTURE_WRAP_T: 10243

The vertical texture wrap.

The vertical texture wrap.

Can be one of REPEAT, CLAMP_TO_EDGE, MIRRORED_REPEAT.

final val TRIANGLES: 4

Specifies the elements should be drawn as triangles.

Specifies the elements should be drawn as triangles.

See also:
final val TRIANGLE_FAN: 6

Specifies the elements should be drawn as a triangle fan.

Specifies the elements should be drawn as a triangle fan.

See also:
final val TRIANGLE_STRIP: 5

Specifies the elements should be drawn as a triangle strip.

Specifies the elements should be drawn as a triangle strip.

See also:
final val UNPACK_ALIGNMENT: 3317
final val UNPACK_FLIP_Y_WEBGL: 37440
final val UNSIGNED_BYTE: 5121
final val UNSIGNED_INT: 5125
final val UNSIGNED_SHORT: 5123
final val UNSIGNED_SHORT_4_4_4_4: 32819
final val UNSIGNED_SHORT_5_5_5_1: 32820
final val UNSIGNED_SHORT_5_6_5: 33635
final val VALIDATE_STATUS: 35715
final val VENDOR: 7936
final val VERSION: 7938
final val VERTEX_ATTRIB_ARRAY_SIZE: 34339
final val VERTEX_ATTRIB_ARRAY_TYPE: 34341
final val VERTEX_SHADER: 35633
final val VIEWPORT: 2978
final val ZERO: 0

Implicits