WebGL2RenderingContext
The WebGL2RenderingContext interface provides the OpenGL ES 3.0 rendering context for the drawing surface of an HTML canvas
element.
Documentation WebGL2RenderingContext by Mozilla Contributors, licensed under CC-BY-SA 2.5.
Static Members
READ_BUFFER: Int
UNPACK_ROW_LENGTH: Int
UNPACK_SKIP_ROWS: Int
UNPACK_SKIP_PIXELS: Int
PACK_ROW_LENGTH: Int
PACK_SKIP_ROWS: Int
PACK_SKIP_PIXELS: Int
COLOR: Int
DEPTH: Int
STENCIL: Int
RED: Int
RGB8: Int
RGBA8: Int
RGB10_A2: Int
TEXTURE_BINDING_3D: Int
UNPACK_SKIP_IMAGES: Int
UNPACK_IMAGE_HEIGHT: Int
TEXTURE_3D: Int
TEXTURE_WRAP_R: Int
MAX_3D_TEXTURE_SIZE: Int
UNSIGNED_INT_2_10_10_10_REV: Int
MAX_ELEMENTS_VERTICES: Int
MAX_ELEMENTS_INDICES: Int
TEXTURE_MIN_LOD: Int
TEXTURE_MAX_LOD: Int
TEXTURE_BASE_LEVEL: Int
TEXTURE_MAX_LEVEL: Int
MIN: Int
MAX: Int
DEPTH_COMPONENT24: Int
MAX_TEXTURE_LOD_BIAS: Int
TEXTURE_COMPARE_MODE: Int
TEXTURE_COMPARE_FUNC: Int
CURRENT_QUERY: Int
QUERY_RESULT: Int
QUERY_RESULT_AVAILABLE: Int
STREAM_READ: Int
STREAM_COPY: Int
STATIC_READ: Int
STATIC_COPY: Int
DYNAMIC_READ: Int
DYNAMIC_COPY: Int
MAX_DRAW_BUFFERS: Int
DRAW_BUFFER0: Int
DRAW_BUFFER1: Int
DRAW_BUFFER2: Int
DRAW_BUFFER3: Int
DRAW_BUFFER4: Int
DRAW_BUFFER5: Int
DRAW_BUFFER6: Int
DRAW_BUFFER7: Int
DRAW_BUFFER8: Int
DRAW_BUFFER9: Int
DRAW_BUFFER10: Int
DRAW_BUFFER11: Int
DRAW_BUFFER12: Int
DRAW_BUFFER13: Int
DRAW_BUFFER14: Int
DRAW_BUFFER15: Int
MAX_FRAGMENT_UNIFORM_COMPONENTS: Int
MAX_VERTEX_UNIFORM_COMPONENTS: Int
SAMPLER_3D: Int
SAMPLER_2D_SHADOW: Int
FRAGMENT_SHADER_DERIVATIVE_HINT: Int
PIXEL_PACK_BUFFER: Int
PIXEL_UNPACK_BUFFER: Int
PIXEL_PACK_BUFFER_BINDING: Int
PIXEL_UNPACK_BUFFER_BINDING: Int
FLOAT_MAT2x3: Int
FLOAT_MAT2x4: Int
FLOAT_MAT3x2: Int
FLOAT_MAT3x4: Int
FLOAT_MAT4x2: Int
FLOAT_MAT4x3: Int
SRGB: Int
SRGB8: Int
SRGB8_ALPHA8: Int
COMPARE_REF_TO_TEXTURE: Int
RGBA32F: Int
RGB32F: Int
RGBA16F: Int
RGB16F: Int
VERTEX_ATTRIB_ARRAY_INTEGER: Int
MAX_ARRAY_TEXTURE_LAYERS: Int
MIN_PROGRAM_TEXEL_OFFSET: Int
MAX_PROGRAM_TEXEL_OFFSET: Int
MAX_VARYING_COMPONENTS: Int
TEXTURE_2D_ARRAY: Int
TEXTURE_BINDING_2D_ARRAY: Int
R11F_G11F_B10F: Int
UNSIGNED_INT_10F_11F_11F_REV: Int
RGB9_E5: Int
UNSIGNED_INT_5_9_9_9_REV: Int
TRANSFORM_FEEDBACK_BUFFER_MODE: Int
MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: Int
TRANSFORM_FEEDBACK_VARYINGS: Int
TRANSFORM_FEEDBACK_BUFFER_START: Int
TRANSFORM_FEEDBACK_BUFFER_SIZE: Int
TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: Int
RASTERIZER_DISCARD: Int
MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: Int
MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: Int
INTERLEAVED_ATTRIBS: Int
SEPARATE_ATTRIBS: Int
TRANSFORM_FEEDBACK_BUFFER: Int
TRANSFORM_FEEDBACK_BUFFER_BINDING: Int
RGBA32UI: Int
RGB32UI: Int
RGBA16UI: Int
RGB16UI: Int
RGBA8UI: Int
RGB8UI: Int
RGBA32I: Int
RGB32I: Int
RGBA16I: Int
RGB16I: Int
RGBA8I: Int
RGB8I: Int
RED_INTEGER: Int
RGB_INTEGER: Int
RGBA_INTEGER: Int
SAMPLER_2D_ARRAY: Int
SAMPLER_2D_ARRAY_SHADOW: Int
SAMPLER_CUBE_SHADOW: Int
UNSIGNED_INT_VEC2: Int
UNSIGNED_INT_VEC3: Int
UNSIGNED_INT_VEC4: Int
INT_SAMPLER_2D: Int
INT_SAMPLER_3D: Int
INT_SAMPLER_CUBE: Int
INT_SAMPLER_2D_ARRAY: Int
UNSIGNED_INT_SAMPLER_2D: Int
UNSIGNED_INT_SAMPLER_3D: Int
UNSIGNED_INT_SAMPLER_CUBE: Int
UNSIGNED_INT_SAMPLER_2D_ARRAY: Int
DEPTH_COMPONENT32F: Int
DEPTH32F_STENCIL8: Int
FLOAT_32_UNSIGNED_INT_24_8_REV: Int
FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: Int
FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: Int
FRAMEBUFFER_ATTACHMENT_RED_SIZE: Int
FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: Int
FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: Int
FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: Int
FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: Int
FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: Int
FRAMEBUFFER_DEFAULT: Int
UNSIGNED_INT_24_8: Int
DEPTH24_STENCIL8: Int
UNSIGNED_NORMALIZED: Int
DRAW_FRAMEBUFFER_BINDING: Int
READ_FRAMEBUFFER: Int
DRAW_FRAMEBUFFER: Int
READ_FRAMEBUFFER_BINDING: Int
RENDERBUFFER_SAMPLES: Int
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: Int
MAX_COLOR_ATTACHMENTS: Int
COLOR_ATTACHMENT1: Int
COLOR_ATTACHMENT2: Int
COLOR_ATTACHMENT3: Int
COLOR_ATTACHMENT4: Int
COLOR_ATTACHMENT5: Int
COLOR_ATTACHMENT6: Int
COLOR_ATTACHMENT7: Int
COLOR_ATTACHMENT8: Int
COLOR_ATTACHMENT9: Int
COLOR_ATTACHMENT10: Int
COLOR_ATTACHMENT11: Int
COLOR_ATTACHMENT12: Int
COLOR_ATTACHMENT13: Int
COLOR_ATTACHMENT14: Int
COLOR_ATTACHMENT15: Int
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: Int
MAX_SAMPLES: Int
HALF_FLOAT: Int
RG: Int
RG_INTEGER: Int
R8: Int
RG8: Int
R16F: Int
R32F: Int
RG16F: Int
RG32F: Int
R8I: Int
R8UI: Int
R16I: Int
R16UI: Int
R32I: Int
R32UI: Int
RG8I: Int
RG8UI: Int
RG16I: Int
RG16UI: Int
RG32I: Int
RG32UI: Int
VERTEX_ARRAY_BINDING: Int
R8_SNORM: Int
RG8_SNORM: Int
RGB8_SNORM: Int
RGBA8_SNORM: Int
SIGNED_NORMALIZED: Int
COPY_READ_BUFFER: Int
COPY_WRITE_BUFFER: Int
COPY_READ_BUFFER_BINDING: Int
COPY_WRITE_BUFFER_BINDING: Int
UNIFORM_BUFFER: Int
UNIFORM_BUFFER_BINDING: Int
UNIFORM_BUFFER_START: Int
UNIFORM_BUFFER_SIZE: Int
MAX_VERTEX_UNIFORM_BLOCKS: Int
MAX_FRAGMENT_UNIFORM_BLOCKS: Int
MAX_COMBINED_UNIFORM_BLOCKS: Int
MAX_UNIFORM_BUFFER_BINDINGS: Int
MAX_UNIFORM_BLOCK_SIZE: Int
MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: Int
MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: Int
UNIFORM_BUFFER_OFFSET_ALIGNMENT: Int
ACTIVE_UNIFORM_BLOCKS: Int
UNIFORM_TYPE: Int
UNIFORM_SIZE: Int
UNIFORM_BLOCK_INDEX: Int
UNIFORM_OFFSET: Int
UNIFORM_ARRAY_STRIDE: Int
UNIFORM_MATRIX_STRIDE: Int
UNIFORM_IS_ROW_MAJOR: Int
UNIFORM_BLOCK_BINDING: Int
UNIFORM_BLOCK_DATA_SIZE: Int
UNIFORM_BLOCK_ACTIVE_UNIFORMS: Int
UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: Int
UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: Int
UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: Int
INVALID_INDEX: Int
MAX_VERTEX_OUTPUT_COMPONENTS: Int
MAX_FRAGMENT_INPUT_COMPONENTS: Int
MAX_SERVER_WAIT_TIMEOUT: Int
OBJECT_TYPE: Int
SYNC_CONDITION: Int
SYNC_STATUS: Int
SYNC_FLAGS: Int
SYNC_FENCE: Int
SYNC_GPU_COMMANDS_COMPLETE: Int
UNSIGNALED: Int
SIGNALED: Int
ALREADY_SIGNALED: Int
TIMEOUT_EXPIRED: Int
CONDITION_SATISFIED: Int
WAIT_FAILED: Int
SYNC_FLUSH_COMMANDS_BIT: Int
VERTEX_ATTRIB_ARRAY_DIVISOR: Int
ANY_SAMPLES_PASSED: Int
ANY_SAMPLES_PASSED_CONSERVATIVE: Int
SAMPLER_BINDING: Int
RGB10_A2UI: Int
INT_2_10_10_10_REV: Int
TRANSFORM_FEEDBACK: Int
TRANSFORM_FEEDBACK_PAUSED: Int
TRANSFORM_FEEDBACK_ACTIVE: Int
TRANSFORM_FEEDBACK_BINDING: Int
TEXTURE_IMMUTABLE_FORMAT: Int
MAX_ELEMENT_INDEX: Int
TEXTURE_IMMUTABLE_LEVELS: Int
TIMEOUT_IGNORED: Int
MAX_CLIENT_WAIT_TIMEOUT_WEBGL: Int
DEPTH_BUFFER_BIT: Int
STENCIL_BUFFER_BIT: Int
COLOR_BUFFER_BIT: Int
POINTS: Int
LINES: Int
LINE_LOOP: Int
LINE_STRIP: Int
TRIANGLES: Int
TRIANGLE_STRIP: Int
TRIANGLE_FAN: Int
ZERO: Int
ONE: Int
SRC_COLOR: Int
ONE_MINUS_SRC_COLOR: Int
SRC_ALPHA: Int
ONE_MINUS_SRC_ALPHA: Int
DST_ALPHA: Int
ONE_MINUS_DST_ALPHA: Int
DST_COLOR: Int
ONE_MINUS_DST_COLOR: Int
SRC_ALPHA_SATURATE: Int
FUNC_ADD: Int
BLEND_EQUATION: Int
BLEND_EQUATION_RGB: Int
BLEND_EQUATION_ALPHA: Int
FUNC_SUBTRACT: Int
FUNC_REVERSE_SUBTRACT: Int
BLEND_DST_RGB: Int
BLEND_SRC_RGB: Int
BLEND_DST_ALPHA: Int
BLEND_SRC_ALPHA: Int
CONSTANT_COLOR: Int
ONE_MINUS_CONSTANT_COLOR: Int
CONSTANT_ALPHA: Int
ONE_MINUS_CONSTANT_ALPHA: Int
BLEND_COLOR: Int
ARRAY_BUFFER: Int
ELEMENT_ARRAY_BUFFER: Int
ARRAY_BUFFER_BINDING: Int
ELEMENT_ARRAY_BUFFER_BINDING: Int
STREAM_DRAW: Int
STATIC_DRAW: Int
DYNAMIC_DRAW: Int
BUFFER_SIZE: Int
BUFFER_USAGE: Int
CURRENT_VERTEX_ATTRIB: Int
FRONT: Int
BACK: Int
FRONT_AND_BACK: Int
CULL_FACE: Int
BLEND: Int
DITHER: Int
STENCIL_TEST: Int
DEPTH_TEST: Int
SCISSOR_TEST: Int
POLYGON_OFFSET_FILL: Int
SAMPLE_ALPHA_TO_COVERAGE: Int
SAMPLE_COVERAGE: Int
NO_ERROR: Int
INVALID_ENUM: Int
INVALID_VALUE: Int
INVALID_OPERATION: Int
OUT_OF_MEMORY: Int
CW: Int
CCW: Int
LINE_WIDTH: Int
ALIASED_POINT_SIZE_RANGE: Int
ALIASED_LINE_WIDTH_RANGE: Int
CULL_FACE_MODE: Int
FRONT_FACE: Int
DEPTH_RANGE: Int
DEPTH_WRITEMASK: Int
DEPTH_CLEAR_VALUE: Int
DEPTH_FUNC: Int
STENCIL_CLEAR_VALUE: Int
STENCIL_FUNC: Int
STENCIL_FAIL: Int
STENCIL_PASS_DEPTH_FAIL: Int
STENCIL_PASS_DEPTH_PASS: Int
STENCIL_REF: Int
STENCIL_VALUE_MASK: Int
STENCIL_WRITEMASK: Int
STENCIL_BACK_FUNC: Int
STENCIL_BACK_FAIL: Int
STENCIL_BACK_PASS_DEPTH_FAIL: Int
STENCIL_BACK_PASS_DEPTH_PASS: Int
STENCIL_BACK_REF: Int
STENCIL_BACK_VALUE_MASK: Int
STENCIL_BACK_WRITEMASK: Int
VIEWPORT: Int
SCISSOR_BOX: Int
COLOR_CLEAR_VALUE: Int
COLOR_WRITEMASK: Int
UNPACK_ALIGNMENT: Int
PACK_ALIGNMENT: Int
MAX_TEXTURE_SIZE: Int
MAX_VIEWPORT_DIMS: Int
SUBPIXEL_BITS: Int
RED_BITS: Int
GREEN_BITS: Int
BLUE_BITS: Int
ALPHA_BITS: Int
DEPTH_BITS: Int
STENCIL_BITS: Int
POLYGON_OFFSET_UNITS: Int
POLYGON_OFFSET_FACTOR: Int
TEXTURE_BINDING_2D: Int
SAMPLE_BUFFERS: Int
SAMPLES: Int
SAMPLE_COVERAGE_VALUE: Int
SAMPLE_COVERAGE_INVERT: Int
COMPRESSED_TEXTURE_FORMATS: Int
DONT_CARE: Int
FASTEST: Int
NICEST: Int
GENERATE_MIPMAP_HINT: Int
BYTE: Int
UNSIGNED_BYTE: Int
SHORT: Int
UNSIGNED_SHORT: Int
INT: Int
UNSIGNED_INT: Int
FLOAT: Int
DEPTH_COMPONENT: Int
ALPHA: Int
RGB: Int
RGBA: Int
LUMINANCE: Int
LUMINANCE_ALPHA: Int
UNSIGNED_SHORT_4_4_4_4: Int
UNSIGNED_SHORT_5_5_5_1: Int
UNSIGNED_SHORT_5_6_5: Int
FRAGMENT_SHADER: Int
VERTEX_SHADER: Int
MAX_VERTEX_ATTRIBS: Int
MAX_VERTEX_UNIFORM_VECTORS: Int
MAX_VARYING_VECTORS: Int
MAX_COMBINED_TEXTURE_IMAGE_UNITS: Int
MAX_VERTEX_TEXTURE_IMAGE_UNITS: Int
MAX_TEXTURE_IMAGE_UNITS: Int
MAX_FRAGMENT_UNIFORM_VECTORS: Int
SHADER_TYPE: Int
DELETE_STATUS: Int
LINK_STATUS: Int
VALIDATE_STATUS: Int
ATTACHED_SHADERS: Int
ACTIVE_UNIFORMS: Int
ACTIVE_ATTRIBUTES: Int
SHADING_LANGUAGE_VERSION: Int
CURRENT_PROGRAM: Int
NEVER: Int
LESS: Int
EQUAL: Int
LEQUAL: Int
GREATER: Int
NOTEQUAL: Int
GEQUAL: Int
ALWAYS: Int
KEEP: Int
REPLACE: Int
INCR: Int
DECR: Int
INVERT: Int
INCR_WRAP: Int
DECR_WRAP: Int
VENDOR: Int
RENDERER: Int
VERSION: Int
NEAREST: Int
LINEAR: Int
NEAREST_MIPMAP_NEAREST: Int
LINEAR_MIPMAP_NEAREST: Int
NEAREST_MIPMAP_LINEAR: Int
LINEAR_MIPMAP_LINEAR: Int
TEXTURE_MAG_FILTER: Int
TEXTURE_MIN_FILTER: Int
TEXTURE_WRAP_S: Int
TEXTURE_WRAP_T: Int
TEXTURE_2D: Int
TEXTURE: Int
TEXTURE_CUBE_MAP: Int
TEXTURE_BINDING_CUBE_MAP: Int
TEXTURE_CUBE_MAP_POSITIVE_X: Int
TEXTURE_CUBE_MAP_NEGATIVE_X: Int
TEXTURE_CUBE_MAP_POSITIVE_Y: Int
TEXTURE_CUBE_MAP_NEGATIVE_Y: Int
TEXTURE_CUBE_MAP_POSITIVE_Z: Int
TEXTURE_CUBE_MAP_NEGATIVE_Z: Int
MAX_CUBE_MAP_TEXTURE_SIZE: Int
TEXTURE0: Int
TEXTURE1: Int
TEXTURE2: Int
TEXTURE3: Int
TEXTURE4: Int
TEXTURE5: Int
TEXTURE6: Int
TEXTURE7: Int
TEXTURE8: Int
TEXTURE9: Int
TEXTURE10: Int
TEXTURE11: Int
TEXTURE12: Int
TEXTURE13: Int
TEXTURE14: Int
TEXTURE15: Int
TEXTURE16: Int
TEXTURE17: Int
TEXTURE18: Int
TEXTURE19: Int
TEXTURE20: Int
TEXTURE21: Int
TEXTURE22: Int
TEXTURE23: Int
TEXTURE24: Int
TEXTURE25: Int
TEXTURE26: Int
TEXTURE27: Int
TEXTURE28: Int
TEXTURE29: Int
TEXTURE30: Int
TEXTURE31: Int
ACTIVE_TEXTURE: Int
REPEAT: Int
CLAMP_TO_EDGE: Int
MIRRORED_REPEAT: Int
FLOAT_VEC2: Int
FLOAT_VEC3: Int
FLOAT_VEC4: Int
INT_VEC2: Int
INT_VEC3: Int
INT_VEC4: Int
BOOL: Int
BOOL_VEC2: Int
BOOL_VEC3: Int
BOOL_VEC4: Int
FLOAT_MAT2: Int
FLOAT_MAT3: Int
FLOAT_MAT4: Int
SAMPLER_2D: Int
SAMPLER_CUBE: Int
VERTEX_ATTRIB_ARRAY_ENABLED: Int
VERTEX_ATTRIB_ARRAY_SIZE: Int
VERTEX_ATTRIB_ARRAY_STRIDE: Int
VERTEX_ATTRIB_ARRAY_TYPE: Int
VERTEX_ATTRIB_ARRAY_NORMALIZED: Int
VERTEX_ATTRIB_ARRAY_POINTER: Int
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: Int
IMPLEMENTATION_COLOR_READ_TYPE: Int
IMPLEMENTATION_COLOR_READ_FORMAT: Int
COMPILE_STATUS: Int
LOW_FLOAT: Int
MEDIUM_FLOAT: Int
HIGH_FLOAT: Int
LOW_INT: Int
MEDIUM_INT: Int
HIGH_INT: Int
FRAMEBUFFER: Int
RENDERBUFFER: Int
RGBA4: Int
RGB5_A1: Int
RGB565: Int
DEPTH_COMPONENT16: Int
STENCIL_INDEX8: Int
DEPTH_STENCIL: Int
RENDERBUFFER_WIDTH: Int
RENDERBUFFER_HEIGHT: Int
RENDERBUFFER_INTERNAL_FORMAT: Int
RENDERBUFFER_RED_SIZE: Int
RENDERBUFFER_GREEN_SIZE: Int
RENDERBUFFER_BLUE_SIZE: Int
RENDERBUFFER_ALPHA_SIZE: Int
RENDERBUFFER_DEPTH_SIZE: Int
RENDERBUFFER_STENCIL_SIZE: Int
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: Int
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: Int
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: Int
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: Int
COLOR_ATTACHMENT0: Int
DEPTH_ATTACHMENT: Int
STENCIL_ATTACHMENT: Int
DEPTH_STENCIL_ATTACHMENT: Int
NONE: Int
FRAMEBUFFER_COMPLETE: Int
FRAMEBUFFER_INCOMPLETE_ATTACHMENT: Int
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: Int
FRAMEBUFFER_INCOMPLETE_DIMENSIONS: Int
FRAMEBUFFER_UNSUPPORTED: Int
FRAMEBUFFER_BINDING: Int
RENDERBUFFER_BINDING: Int
MAX_RENDERBUFFER_SIZE: Int
INVALID_FRAMEBUFFER_OPERATION: Int
UNPACK_FLIP_Y_WEBGL: Int
UNPACK_PREMULTIPLY_ALPHA_WEBGL: Int
CONTEXT_LOST_WEBGL: Int
UNPACK_COLORSPACE_CONVERSION_WEBGL: Int
BROWSER_DEFAULT_WEBGL: Int
Instance Members
bufferData(target: Int, srcData: js.lib.ArrayBufferView, usage: Int, srcOffset: Int, ?length: Int = 0): Void
Initializes and creates the buffer object's data store.
Name | Type | Default |
---|---|---|
target |
Int | |
srcData |
js.lib.ArrayBufferView | |
usage |
Int | |
srcOffset |
Int | |
length |
Int | 0 |
bufferSubData(target: Int, dstByteOffset: Int, srcData: js.lib.ArrayBufferView, srcOffset: Int, ?length: Int = 0): Void
Updates a subset of a buffer object's data store.
Name | Type | Default |
---|---|---|
target |
Int | |
dstByteOffset |
Int | |
srcData |
js.lib.ArrayBufferView | |
srcOffset |
Int | |
length |
Int | 0 |
copyBufferSubData(readTarget: Int, writeTarget: Int, readOffset: Int, writeOffset: Int, size: Int): Void
Copies part of the data of a buffer to another buffer.
Name | Type |
---|---|
readTarget |
Int |
writeTarget |
Int |
readOffset |
Int |
writeOffset |
Int |
size |
Int |
getBufferSubData(target: Int, srcByteOffset: Int, dstData: js.lib.ArrayBufferView, ?dstOffset: Int = 0, ?length: Int = 0): Void
Reads data from a buffer and writes them to an ArrayBuffer
or SharedArrayBuffer
.
Name | Type | Default |
---|---|---|
target |
Int | |
srcByteOffset |
Int | |
dstData |
js.lib.ArrayBufferView | |
dstOffset |
Int | 0 |
length |
Int | 0 |
blitFramebuffer(srcX0: Int, srcY0: Int, srcX1: Int, srcY1: Int, dstX0: Int, dstY0: Int, dstX1: Int, dstY1: Int, mask: Int, filter: Int): Void
Transfers a block of pixels from the read framebuffer to the draw framebuffer.
Name | Type |
---|---|
srcX0 |
Int |
srcY0 |
Int |
srcX1 |
Int |
srcY1 |
Int |
dstX0 |
Int |
dstY0 |
Int |
dstX1 |
Int |
dstY1 |
Int |
mask |
Int |
filter |
Int |
framebufferTextureLayer(target: Int, attachment: Int, texture: Texture, level: Int, layer: Int): Void
Attaches a single layer of a texture to a framebuffer.
Name | Type |
---|---|
target |
Int |
attachment |
Int |
texture |
Texture |
level |
Int |
layer |
Int |
Invalidates the contents of attachments in a framebuffer.
Name | Type |
---|---|
target |
Int |
attachments |
Array<Int> |
invalidateSubFramebuffer(target: Int, attachments: Array<Int>, x: Int, y: Int, width: Int, height: Int): Void
Invalidates portions of the contents of attachments in a framebuffer
Name | Type |
---|---|
target |
Int |
attachments |
Array<Int> |
x |
Int |
y |
Int |
width |
Int |
height |
Int |
Selects a color buffer as the source for pixels.
Name | Type |
---|---|
src |
Int |
Returns information about implementation-dependent support for internal formats.
Name | Type |
---|---|
target |
Int |
internalformat |
Int |
pname |
Int |
Returns |
---|
Dynamic |
renderbufferStorageMultisample(target: Int, samples: Int, internalformat: Int, width: Int, height: Int): Void
Creates and initializes a renderbuffer object's data store and allows specifying the number of samples to be used.
Name | Type |
---|---|
target |
Int |
samples |
Int |
internalformat |
Int |
width |
Int |
height |
Int |
Specifies all levels of two-dimensional texture storage.
Name | Type |
---|---|
target |
Int |
levels |
Int |
internalformat |
Int |
width |
Int |
height |
Int |
texStorage3D(target: Int, levels: Int, internalformat: Int, width: Int, height: Int, depth: Int): Void
Specifies all levels of a three-dimensional texture or two-dimensional array texture.
Name | Type |
---|---|
target |
Int |
levels |
Int |
internalformat |
Int |
width |
Int |
height |
Int |
depth |
Int |
texImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, format: Int, type: Int, srcData: js.lib.ArrayBufferView, srcOffset: Int): Void
Name | Type |
---|---|
target |
Int |
level |
Int |
internalformat |
Int |
width |
Int |
height |
Int |
border |
Int |
format |
Int |
type |
Int |
srcData |
js.lib.ArrayBufferView |
srcOffset |
Int |
texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, width: Int, height: Int, format: Int, type: Int, srcData: js.lib.ArrayBufferView, srcOffset: Int): Void
Name | Type |
---|---|
target |
Int |
level |
Int |
xoffset |
Int |
yoffset |
Int |
width |
Int |
height |
Int |
format |
Int |
type |
Int |
srcData |
js.lib.ArrayBufferView |
srcOffset |
Int |
texImage3D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, depth: Int, border: Int, format: Int, type: Int, srcData: js.lib.ArrayBufferView, srcOffset: Int): Void
Specifies a three-dimensional texture image.
Name | Type |
---|---|
target |
Int |
level |
Int |
internalformat |
Int |
width |
Int |
height |
Int |
depth |
Int |
border |
Int |
format |
Int |
type |
Int |
srcData |
js.lib.ArrayBufferView |
srcOffset |
Int |
texSubImage3D(target: Int, level: Int, xoffset: Int, yoffset: Int, zoffset: Int, width: Int, height: Int, depth: Int, format: Int, type: Int, srcData: js.lib.ArrayBufferView, ?srcOffset: Int = 0): Void
Specifies a sub-rectangle of the current 3D texture.
Name | Type | Default |
---|---|---|
target |
Int | |
level |
Int | |
xoffset |
Int | |
yoffset |
Int | |
zoffset |
Int | |
width |
Int | |
height |
Int | |
depth |
Int | |
format |
Int | |
type |
Int | |
srcData |
js.lib.ArrayBufferView | |
srcOffset |
Int | 0 |
copyTexSubImage3D(target: Int, level: Int, xoffset: Int, yoffset: Int, zoffset: Int, x: Int, y: Int, width: Int, height: Int): Void
Copies pixels from the current WebGLFramebuffer
into an existing 3D texture sub-image.
Name | Type |
---|---|
target |
Int |
level |
Int |
xoffset |
Int |
yoffset |
Int |
zoffset |
Int |
x |
Int |
y |
Int |
width |
Int |
height |
Int |
compressedTexImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, srcData: js.lib.ArrayBufferView, ?srcOffset: Int = 0, ?srcLengthOverride: Int = 0): Void
Name | Type | Default |
---|---|---|
target |
Int | |
level |
Int | |
internalformat |
Int | |
width |
Int | |
height |
Int | |
border |
Int | |
srcData |
js.lib.ArrayBufferView | |
srcOffset |
Int | 0 |
srcLengthOverride |
Int | 0 |
compressedTexImage3D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, depth: Int, border: Int, srcData: js.lib.ArrayBufferView, ?srcOffset: Int = 0, ?srcLengthOverride: Int = 0): Void
Specifies a three-dimensional texture image in a compressed format.
Name | Type | Default |
---|---|---|
target |
Int | |
level |
Int | |
internalformat |
Int | |
width |
Int | |
height |
Int | |
depth |
Int | |
border |
Int | |
srcData |
js.lib.ArrayBufferView | |
srcOffset |
Int | 0 |
srcLengthOverride |
Int | 0 |
compressedTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, width: Int, height: Int, format: Int, srcData: js.lib.ArrayBufferView, ?srcOffset: Int = 0, ?srcLengthOverride: Int = 0): Void
Name | Type | Default |
---|---|---|
target |
Int | |
level |
Int | |
xoffset |
Int | |
yoffset |
Int | |
width |
Int | |
height |
Int | |
format |
Int | |
srcData |
js.lib.ArrayBufferView | |
srcOffset |
Int | 0 |
srcLengthOverride |
Int | 0 |
compressedTexSubImage3D(target: Int, level: Int, xoffset: Int, yoffset: Int, zoffset: Int, width: Int, height: Int, depth: Int, format: Int, srcData: js.lib.ArrayBufferView, ?srcOffset: Int = 0, ?srcLengthOverride: Int = 0): Void
Specifies a three-dimensional sub-rectangle for a texture image in a compressed format.
Name | Type | Default |
---|---|---|
target |
Int | |
level |
Int | |
xoffset |
Int | |
yoffset |
Int | |
zoffset |
Int | |
width |
Int | |
height |
Int | |
depth |
Int | |
format |
Int | |
srcData |
js.lib.ArrayBufferView | |
srcOffset |
Int | 0 |
srcLengthOverride |
Int | 0 |
Returns the binding of color numbers to user-defined varying out variables.
Name | Type |
---|---|
program |
Program |
name |
String |
Returns |
---|
Int |
uniform1ui(location: UniformLocation, v0: Int): Void
Name | Type |
---|---|
location |
UniformLocation |
v0 |
Int |
uniform2ui(location: UniformLocation, v0: Int, v1: Int): Void
Name | Type |
---|---|
location |
UniformLocation |
v0 |
Int |
v1 |
Int |
uniform3ui(location: UniformLocation, v0: Int, v1: Int, v2: Int): Void
Name | Type |
---|---|
location |
UniformLocation |
v0 |
Int |
v1 |
Int |
v2 |
Int |
Name | Type |
---|---|
location |
UniformLocation |
v0 |
Int |
v1 |
Int |
v2 |
Int |
v3 |
Int |
uniform1fv(location: UniformLocation, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform2fv(location: UniformLocation, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform3fv(location: UniformLocation, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform4fv(location: UniformLocation, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform1iv(location: UniformLocation, data: js.lib.Int32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Int32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform2iv(location: UniformLocation, data: js.lib.Int32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Int32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform3iv(location: UniformLocation, data: js.lib.Int32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Int32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform4iv(location: UniformLocation, data: js.lib.Int32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Int32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform1uiv(location: UniformLocation, data: js.lib.Uint32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Uint32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform2uiv(location: UniformLocation, data: js.lib.Uint32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Uint32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform3uiv(location: UniformLocation, data: js.lib.Uint32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Uint32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniform4uiv(location: UniformLocation, data: js.lib.Uint32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
data |
js.lib.Uint32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniformMatrix2fv(location: UniformLocation, transpose: Bool, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
transpose |
Bool | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniformMatrix3x2fv(location: UniformLocation, transpose: Bool, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
transpose |
Bool | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniformMatrix4x2fv(location: UniformLocation, transpose: Bool, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
transpose |
Bool | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniformMatrix2x3fv(location: UniformLocation, transpose: Bool, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
transpose |
Bool | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniformMatrix3fv(location: UniformLocation, transpose: Bool, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
transpose |
Bool | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniformMatrix4x3fv(location: UniformLocation, transpose: Bool, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
transpose |
Bool | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniformMatrix2x4fv(location: UniformLocation, transpose: Bool, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
transpose |
Bool | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniformMatrix3x4fv(location: UniformLocation, transpose: Bool, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
transpose |
Bool | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
uniformMatrix4fv(location: UniformLocation, transpose: Bool, data: js.lib.Float32Array, ?srcOffset: Int = 0, ?srcLength: Int = 0): Void
Name | Type | Default |
---|---|---|
location |
UniformLocation | |
transpose |
Bool | |
data |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
srcLength |
Int | 0 |
Name | Type |
---|---|
index |
Int |
x |
Int |
y |
Int |
z |
Int |
w |
Int |
vertexAttribI4iv(index: Int, values: js.lib.Int32Array): Void
Name | Type |
---|---|
index |
Int |
values |
js.lib.Int32Array |
Name | Type |
---|---|
index |
Int |
x |
Int |
y |
Int |
z |
Int |
w |
Int |
vertexAttribI4uiv(index: Int, values: js.lib.Uint32Array): Void
Name | Type |
---|---|
index |
Int |
values |
js.lib.Uint32Array |
Specifies integer data formats and locations of vertex attributes in a vertex attributes array.
Name | Type |
---|---|
index |
Int |
size |
Int |
type |
Int |
stride |
Int |
offset |
Int |
Modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with WebGL2RenderingContext.drawArraysInstanced()
and WebGL2RenderingContext.drawElementsInstanced()
.
Name | Type |
---|---|
index |
Int |
divisor |
Int |
Renders primitives from array data. In addition, it can execute multiple instances of the range of elements.
Name | Type |
---|---|
mode |
Int |
first |
Int |
count |
Int |
instanceCount |
Int |
Renders primitives from array data. In addition, it can execute multiple instances of a set of elements.
Name | Type |
---|---|
mode |
Int |
count |
Int |
type |
Int |
offset |
Int |
instanceCount |
Int |
Renders primitives from array data in a given range.
Name | Type |
---|---|
mode |
Int |
start |
Int |
end |
Int |
count |
Int |
type |
Int |
offset |
Int |
readPixels(x: Int, y: Int, width: Int, height: Int, format: Int, type: Int, dstData: js.lib.ArrayBufferView, dstOffset: Int): Void
Name | Type |
---|---|
x |
Int |
y |
Int |
width |
Int |
height |
Int |
format |
Int |
type |
Int |
dstData |
js.lib.ArrayBufferView |
dstOffset |
Int |
Specifies a list of color buffers to be drawn into.
Name | Type |
---|---|
buffers |
Array<Int> |
clearBufferfv(buffer: Int, drawbuffer: Int, values: js.lib.Float32Array, ?srcOffset: Int = 0): Void
Name | Type | Default |
---|---|---|
buffer |
Int | |
drawbuffer |
Int | |
values |
js.lib.Float32Array | |
srcOffset |
Int | 0 |
clearBufferiv(buffer: Int, drawbuffer: Int, values: js.lib.Int32Array, ?srcOffset: Int = 0): Void
Name | Type | Default |
---|---|---|
buffer |
Int | |
drawbuffer |
Int | |
values |
js.lib.Int32Array | |
srcOffset |
Int | 0 |
clearBufferuiv(buffer: Int, drawbuffer: Int, values: js.lib.Uint32Array, ?srcOffset: Int = 0): Void
Name | Type | Default |
---|---|---|
buffer |
Int | |
drawbuffer |
Int | |
values |
js.lib.Uint32Array | |
srcOffset |
Int | 0 |
Name | Type |
---|---|
buffer |
Int |
drawbuffer |
Int |
depth |
Float |
stencil |
Int |
createQuery(): Query
Creates a new WebGLQuery
object.
Returns |
---|
Query |
Deletes a given WebGLQuery
object.
Name | Type |
---|---|
query |
Query |
Returns true
if a given object is a valid WebGLQuery
object.
Name | Type |
---|---|
query |
Query |
Returns |
---|
Bool |
Begins an asynchronous query.
Name | Type |
---|---|
target |
Int |
query |
Query |
Marks the end of an asynchronous query.
Name | Type |
---|---|
target |
Int |
Returns a WebGLQuery
object for a given target.
Name | Type |
---|---|
target |
Int |
pname |
Int |
Returns |
---|
Dynamic |
Returns information about a query.
Name | Type |
---|---|
query |
Query |
pname |
Int |
Returns |
---|
Dynamic |
createSampler(): Sampler
Creates a new WebGLSampler
object.
Returns |
---|
Sampler |
Deletes a given WebGLSampler
object.
Name | Type |
---|---|
sampler |
Sampler |
Returns true
if a given object is a valid WebGLSampler
object.
Name | Type |
---|---|
sampler |
Sampler |
Returns |
---|
Bool |
Binds a given WebGLSampler
to a texture unit.
Name | Type |
---|---|
unit |
Int |
sampler |
Sampler |
Name | Type |
---|---|
sampler |
Sampler |
pname |
Int |
param |
Int |
Name | Type |
---|---|
sampler |
Sampler |
pname |
Int |
param |
Float |
Returns sampler parameter information.
Name | Type |
---|---|
sampler |
Sampler |
pname |
Int |
Returns |
---|
Dynamic |
Creates a new WebGLSync
object and inserts it into the GL command stream.
Name | Type |
---|---|
condition |
Int |
flags |
Int |
Returns |
---|
Sync |
Returns true
if the passed object is a valid WebGLSync
object.
Name | Type |
---|---|
sync |
Sync |
Returns |
---|
Bool |
Deletes a given WebGLSync
object.
Name | Type |
---|---|
sync |
Sync |
Blocks and waits for a WebGLSync
object to become signaled or a given timeout to be passed.
Name | Type |
---|---|
sync |
Sync |
flags |
Int |
timeout |
Int |
Returns |
---|
Int |
Returns immediately, but waits on the GL server until the given WebGLSync
object is signaled.
Name | Type |
---|---|
sync |
Sync |
flags |
Int |
timeout |
Int |
Returns parameter information of a WebGLSync
object.
Name | Type |
---|---|
sync |
Sync |
pname |
Int |
Returns |
---|
Dynamic |
createTransformFeedback(): TransformFeedback
Creates and initializes WebGLTransformFeedback
objects.
Returns |
---|
TransformFeedback |
deleteTransformFeedback(tf: TransformFeedback): Void
Deletes a given WebGLTransformFeedback
object.
Name | Type |
---|---|
tf |
TransformFeedback |
isTransformFeedback(tf: TransformFeedback): Bool
Returns true
if the passed object is a valid WebGLTransformFeedback
object.
Name | Type |
---|---|
tf |
TransformFeedback |
Returns |
---|
Bool |
bindTransformFeedback(target: Int, tf: TransformFeedback): Void
Binds a passed WebGLTransformFeedback
object to the current GL state.
Name | Type |
---|---|
target |
Int |
tf |
TransformFeedback |
Starts a transform feedback operation.
Name | Type |
---|---|
primitiveMode |
Int |
endTransformFeedback(): Void
Ends a transform feedback operation.
Specifies values to record in WebGLTransformFeedback
buffers.
Name | Type |
---|---|
program |
Program |
varyings |
Array<String> |
bufferMode |
Int |
getTransformFeedbackVarying(program: Program, index: Int): ActiveInfo
Returns information about varying variables from WebGLTransformFeedback
buffers.
Name | Type |
---|---|
program |
Program |
index |
Int |
Returns |
---|
ActiveInfo |
pauseTransformFeedback(): Void
Pauses a transform feedback operation.
resumeTransformFeedback(): Void
Resumes a transform feedback operation.
Binds a given WebGLBuffer
to a given binding point (target
) at a given index
.
Name | Type |
---|---|
target |
Int |
index |
Int |
buffer |
Buffer |
Binds a range of a given WebGLBuffer
to a given binding point (target
) at a given index
.
Name | Type |
---|---|
target |
Int |
index |
Int |
buffer |
Buffer |
offset |
Int |
size |
Int |
Returns the indexed value for the given target
.
Name | Type |
---|---|
target |
Int |
index |
Int |
Returns |
---|
Dynamic |
Retrieves the indices of a number of uniforms within a WebGLProgram
.
Name | Type |
---|---|
program |
Program |
uniformNames |
Array<String> |
Returns |
---|
Array<Int> |
Retrieves information about active uniforms within a WebGLProgram
.
Name | Type |
---|---|
program |
Program |
uniformIndices |
Array<Int> |
pname |
Int |
Returns |
---|
Dynamic |
Retrieves the index of a uniform block within a WebGLProgram
.
Name | Type |
---|---|
program |
Program |
uniformBlockName |
String |
Returns |
---|
Int |
Retrieves information about an active uniform block within a WebGLProgram
.
Name | Type |
---|---|
program |
Program |
uniformBlockIndex |
Int |
pname |
Int |
Returns |
---|
Dynamic |
Retrieves the name of the active uniform block at a given index within a WebGLProgram
.
Name | Type |
---|---|
program |
Program |
uniformBlockIndex |
Int |
Returns |
---|
String |
Assigns binding points for active uniform blocks.
Name | Type |
---|---|
program |
Program |
uniformBlockIndex |
Int |
uniformBlockBinding |
Int |
createVertexArray(): VertexArrayObject
Creates a new WebGLVertexArrayObject
.
Returns |
---|
VertexArrayObject |
deleteVertexArray(vertexArray: VertexArrayObject): Void
Deletes a given WebGLVertexArrayObject
.
Name | Type |
---|---|
vertexArray |
VertexArrayObject |
isVertexArray(vertexArray: VertexArrayObject): Bool
Returns true
if a given object is a valid WebGLVertexArrayObject
.
Name | Type |
---|---|
vertexArray |
VertexArrayObject |
Returns |
---|
Bool |
bindVertexArray(array: VertexArrayObject): Void
Binds a given WebGLVertexArrayObject
to the buffer.
Name | Type |
---|---|
array |
VertexArrayObject |
getContextAttributes(): ContextAttributes
Returns |
---|
ContextAttributes |
isContextLost(): Bool
Returns |
---|
Bool |
Returns |
---|
Array<String> |
getExtension(name: Extension<getExtension.T>): getExtension.T
Name | Type |
---|---|
name |
Extension<getExtension.T> |
Returns |
---|
getExtension.T |
Name | Type |
---|---|
texture |
Int |
Name | Type |
---|---|
program |
Program |
shader |
Shader |
Name | Type |
---|---|
program |
Program |
index |
Int |
name |
String |
Name | Type |
---|---|
target |
Int |
buffer |
Buffer |
bindFramebuffer(target: Int, framebuffer: Framebuffer): Void
Name | Type |
---|---|
target |
Int |
framebuffer |
Framebuffer |
bindRenderbuffer(target: Int, renderbuffer: Renderbuffer): Void
Name | Type |
---|---|
target |
Int |
renderbuffer |
Renderbuffer |
Name | Type |
---|---|
target |
Int |
texture |
Texture |
Name | Type |
---|---|
red |
Float |
green |
Float |
blue |
Float |
alpha |
Float |
Name | Type |
---|---|
mode |
Int |
Name | Type |
---|---|
modeRGB |
Int |
modeAlpha |
Int |
Name | Type |
---|---|
sfactor |
Int |
dfactor |
Int |
Name | Type |
---|---|
srcRGB |
Int |
dstRGB |
Int |
srcAlpha |
Int |
dstAlpha |
Int |
Name | Type |
---|---|
target |
Int |
Returns |
---|
Int |
Name | Type |
---|---|
mask |
Int |
Name | Type |
---|---|
red |
Float |
green |
Float |
blue |
Float |
alpha |
Float |
Name | Type |
---|---|
depth |
Float |
Name | Type |
---|---|
s |
Int |
Name | Type |
---|---|
red |
Bool |
green |
Bool |
blue |
Bool |
alpha |
Bool |
Name | Type |
---|---|
shader |
Shader |
copyTexImage2D(target: Int, level: Int, internalformat: Int, x: Int, y: Int, width: Int, height: Int, border: Int): Void
Name | Type |
---|---|
target |
Int |
level |
Int |
internalformat |
Int |
x |
Int |
y |
Int |
width |
Int |
height |
Int |
border |
Int |
copyTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, x: Int, y: Int, width: Int, height: Int): Void
Name | Type |
---|---|
target |
Int |
level |
Int |
xoffset |
Int |
yoffset |
Int |
x |
Int |
y |
Int |
width |
Int |
height |
Int |
createBuffer(): Buffer
Returns |
---|
Buffer |
createFramebuffer(): Framebuffer
Returns |
---|
Framebuffer |
createProgram(): Program
Returns |
---|
Program |
createRenderbuffer(): Renderbuffer
Returns |
---|
Renderbuffer |
Name | Type |
---|---|
type |
Int |
Returns |
---|
Shader |
createTexture(): Texture
Returns |
---|
Texture |
Name | Type |
---|---|
mode |
Int |
Name | Type |
---|---|
buffer |
Buffer |
deleteFramebuffer(framebuffer: Framebuffer): Void
Name | Type |
---|---|
framebuffer |
Framebuffer |
Name | Type |
---|---|
program |
Program |
deleteRenderbuffer(renderbuffer: Renderbuffer): Void
Name | Type |
---|---|
renderbuffer |
Renderbuffer |
Name | Type |
---|---|
shader |
Shader |
Name | Type |
---|---|
texture |
Texture |
Name | Type |
---|---|
func |
Int |
Name | Type |
---|---|
flag |
Bool |
Name | Type |
---|---|
zNear |
Float |
zFar |
Float |
Name | Type |
---|---|
program |
Program |
shader |
Shader |
Name | Type |
---|---|
cap |
Int |
Name | Type |
---|---|
index |
Int |
Name | Type |
---|---|
mode |
Int |
first |
Int |
count |
Int |
Name | Type |
---|---|
mode |
Int |
count |
Int |
type |
Int |
offset |
Int |
Name | Type |
---|---|
cap |
Int |
Name | Type |
---|---|
index |
Int |
finish(): Void
flush(): Void
framebufferRenderbuffer(target: Int, attachment: Int, renderbuffertarget: Int, renderbuffer: Renderbuffer): Void
Name | Type |
---|---|
target |
Int |
attachment |
Int |
renderbuffertarget |
Int |
renderbuffer |
Renderbuffer |
framebufferTexture2D(target: Int, attachment: Int, textarget: Int, texture: Texture, level: Int): Void
Name | Type |
---|---|
target |
Int |
attachment |
Int |
textarget |
Int |
texture |
Texture |
level |
Int |
Name | Type |
---|---|
mode |
Int |
Name | Type |
---|---|
target |
Int |
getActiveAttrib(program: Program, index: Int): ActiveInfo
Name | Type |
---|---|
program |
Program |
index |
Int |
Returns |
---|
ActiveInfo |
getActiveUniform(program: Program, index: Int): ActiveInfo
Name | Type |
---|---|
program |
Program |
index |
Int |
Returns |
---|
ActiveInfo |
Name | Type |
---|---|
program |
Program |
Returns |
---|
Array<Shader> |
Name | Type |
---|---|
program |
Program |
name |
String |
Returns |
---|
Int |
Name | Type |
---|---|
target |
Int |
pname |
Int |
Returns |
---|
Dynamic |
Name | Type |
---|---|
pname |
Int |
Returns |
---|
Dynamic |
getError(): Int
Returns |
---|
Int |
Name | Type |
---|---|
target |
Int |
attachment |
Int |
pname |
Int |
Returns |
---|
Dynamic |
Name | Type |
---|---|
program |
Program |
pname |
Int |
Returns |
---|
Dynamic |
Name | Type |
---|---|
program |
Program |
Returns |
---|
String |
Name | Type |
---|---|
target |
Int |
pname |
Int |
Returns |
---|
Dynamic |
Name | Type |
---|---|
shader |
Shader |
pname |
Int |
Returns |
---|
Dynamic |
getShaderPrecisionFormat(shadertype: Int, precisiontype: Int): ShaderPrecisionFormat
Name | Type |
---|---|
shadertype |
Int |
precisiontype |
Int |
Returns |
---|
ShaderPrecisionFormat |
Name | Type |
---|---|
shader |
Shader |
Returns |
---|
String |
Name | Type |
---|---|
shader |
Shader |
Returns |
---|
String |
Name | Type |
---|---|
target |
Int |
pname |
Int |
Returns |
---|
Dynamic |
getUniform(program: Program, location: UniformLocation): Dynamic
Name | Type |
---|---|
program |
Program |
location |
UniformLocation |
Returns |
---|
Dynamic |
getUniformLocation(program: Program, name: String): UniformLocation
Name | Type |
---|---|
program |
Program |
name |
String |
Returns |
---|
UniformLocation |
Name | Type |
---|---|
index |
Int |
pname |
Int |
Returns |
---|
Dynamic |
Name | Type |
---|---|
index |
Int |
pname |
Int |
Returns |
---|
Int |
Name | Type |
---|---|
target |
Int |
mode |
Int |
Name | Type |
---|---|
buffer |
Buffer |
Returns |
---|
Bool |
Name | Type |
---|---|
cap |
Int |
Returns |
---|
Bool |
isFramebuffer(framebuffer: Framebuffer): Bool
Name | Type |
---|---|
framebuffer |
Framebuffer |
Returns |
---|
Bool |
Name | Type |
---|---|
program |
Program |
Returns |
---|
Bool |
isRenderbuffer(renderbuffer: Renderbuffer): Bool
Name | Type |
---|---|
renderbuffer |
Renderbuffer |
Returns |
---|
Bool |
Name | Type |
---|---|
shader |
Shader |
Returns |
---|
Bool |
Name | Type |
---|---|
texture |
Texture |
Returns |
---|
Bool |
Name | Type |
---|---|
width |
Float |
Name | Type |
---|---|
program |
Program |
Name | Type |
---|---|
pname |
Int |
param |
Int |
Name | Type |
---|---|
factor |
Float |
units |
Float |
Name | Type |
---|---|
target |
Int |
internalformat |
Int |
width |
Int |
height |
Int |
Name | Type |
---|---|
value |
Float |
invert |
Bool |
Name | Type |
---|---|
x |
Int |
y |
Int |
width |
Int |
height |
Int |
Name | Type |
---|---|
shader |
Shader |
source |
String |
Name | Type |
---|---|
func |
Int |
ref |
Int |
mask |
Int |
Name | Type |
---|---|
face |
Int |
func |
Int |
ref |
Int |
mask |
Int |
Name | Type |
---|---|
mask |
Int |
Name | Type |
---|---|
face |
Int |
mask |
Int |
Name | Type |
---|---|
fail |
Int |
zfail |
Int |
zpass |
Int |
Name | Type |
---|---|
face |
Int |
fail |
Int |
zfail |
Int |
zpass |
Int |
Name | Type |
---|---|
target |
Int |
pname |
Int |
param |
Float |
Name | Type |
---|---|
target |
Int |
pname |
Int |
param |
Int |
uniform1f(location: UniformLocation, x: Float): Void
Name | Type |
---|---|
location |
UniformLocation |
x |
Float |
uniform2f(location: UniformLocation, x: Float, y: Float): Void
Name | Type |
---|---|
location |
UniformLocation |
x |
Float |
y |
Float |
uniform3f(location: UniformLocation, x: Float, y: Float, z: Float): Void
Name | Type |
---|---|
location |
UniformLocation |
x |
Float |
y |
Float |
z |
Float |
Name | Type |
---|---|
location |
UniformLocation |
x |
Float |
y |
Float |
z |
Float |
w |
Float |
uniform1i(location: UniformLocation, x: Int): Void
Name | Type |
---|---|
location |
UniformLocation |
x |
Int |
uniform2i(location: UniformLocation, x: Int, y: Int): Void
Name | Type |
---|---|
location |
UniformLocation |
x |
Int |
y |
Int |
uniform3i(location: UniformLocation, x: Int, y: Int, z: Int): Void
Name | Type |
---|---|
location |
UniformLocation |
x |
Int |
y |
Int |
z |
Int |
Name | Type |
---|---|
location |
UniformLocation |
x |
Int |
y |
Int |
z |
Int |
w |
Int |
Name | Type |
---|---|
program |
Program |
Name | Type |
---|---|
program |
Program |
Name | Type |
---|---|
indx |
Int |
x |
Float |
vertexAttrib1fv(indx: Int, values: js.lib.Float32Array): Void
Name | Type |
---|---|
indx |
Int |
values |
js.lib.Float32Array |
Name | Type |
---|---|
indx |
Int |
x |
Float |
y |
Float |
vertexAttrib2fv(indx: Int, values: js.lib.Float32Array): Void
Name | Type |
---|---|
indx |
Int |
values |
js.lib.Float32Array |
Name | Type |
---|---|
indx |
Int |
x |
Float |
y |
Float |
z |
Float |
vertexAttrib3fv(indx: Int, values: js.lib.Float32Array): Void
Name | Type |
---|---|
indx |
Int |
values |
js.lib.Float32Array |
Name | Type |
---|---|
indx |
Int |
x |
Float |
y |
Float |
z |
Float |
w |
Float |
vertexAttrib4fv(indx: Int, values: js.lib.Float32Array): Void
Name | Type |
---|---|
indx |
Int |
values |
js.lib.Float32Array |
vertexAttribPointer(indx: Int, size: Int, type: Int, normalized: Bool, stride: Int, offset: Int): Void
Name | Type |
---|---|
indx |
Int |
size |
Int |
type |
Int |
normalized |
Bool |
stride |
Int |
offset |
Int |
Name | Type |
---|---|
x |
Int |
y |
Int |
width |
Int |
height |
Int |