Context

Context

new

DOC_TBA

Throws:
Source:

Methods

DOC_TBA

Executes the specified clear command.

Parameters:
Name Type Argument Description
clearCommand ClearCommand <optional>
The command with which to clear.
passState PassState <optional>
The state for the current rendering pass.
See:

DOC_TBA

DOC_TBA. description.source can be {ImageData}, {HTMLImageElement}, {HTMLCanvasElement}, or {HTMLVideoElement}.

Throws:
  • RuntimeError : When description.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.
  • DeveloperError : description is required.
  • DeveloperError : description.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.
  • DeveloperError : Each face in description.sources must have the same width and height.
  • DeveloperError : description requires a source field to create an initialized cube map or width and height fields to create a blank cube map.
  • DeveloperError : Width must equal height.
  • DeveloperError : Width and height must be greater than zero.
  • DeveloperError : Width and height must be less than or equal to the maximum cube map size.
  • DeveloperError : Invalid description.pixelFormat.
  • DeveloperError : description.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.
  • DeveloperError : Invalid description.pixelDatatype.
Returns:
CubeMap DOC_TBA.
See:

Creates a framebuffer with optional initial color, depth, and stencil attachments. Framebuffers are used for render-to-texture effects; they allow us to render to a texture in one pass, and read from it in a later pass.

Parameters:
Name Type Argument Description
description Object <optional>
The initial framebuffer attachments as shown in Example 2. The possible properties are colorTexture, colorRenderbuffer, depthTexture, depthRenderbuffer, stencilRenderbuffer, depthStencilTexture, and depthStencilRenderbuffer.
Throws:
  • DeveloperError : Cannot have both a color texture and color renderbuffer attachment.
  • DeveloperError : Cannot have both a depth texture and depth renderbuffer attachment.
  • DeveloperError : Cannot have both a depth-stencil texture and depth-stencil renderbuffer attachment.
  • DeveloperError : Cannot have both a depth and depth-stencil renderbuffer.
  • DeveloperError : Cannot have both a stencil and depth-stencil renderbuffer.
  • DeveloperError : Cannot have both a depth and stencil renderbuffer.
  • DeveloperError : The color-texture pixel-format must be a color format.
  • DeveloperError : The depth-texture pixel-format must be DEPTH_COMPONENT.
  • DeveloperError : The depth-stencil-texture pixel-format must be DEPTH_STENCIL.
Returns:
Framebuffer The created framebuffer.
Example
// Example 1. Create a framebuffer with no initial attachments,
// and then add a color-texture attachment.
var framebuffer = context.createFramebuffer();
framebuffer.setColorTexture(context.createTexture2D({
    width : 256,
    height : 256,
}));

//////////////////////////////////////////////////////////////////

// Example 2. Create a framebuffer with color and depth texture attachments.
var width = context.getCanvas().clientWidth;
var height = context.getCanvas().clientHeight;
var framebuffer = context.createFramebuffer({
  colorTexture : context.createTexture2D({
    width : width,
    height : height,
    pixelFormat : PixelFormat.RGBA
  }),
  depthTexture : context.createTexture2D({
    width : width,
    height : height,
    pixelFormat : PixelFormat.DEPTH_COMPONENT,
    pixelDatatype : PixelDatatype.UNSIGNED_SHORT
  })
});
See:

Creates an index buffer, which contains typed indices in GPU-controlled memory.

An index buffer can be attached to a vertex array to select vertices for rendering. Context.draw can render using the entire index buffer or a subset of the index buffer defined by an offset and count.

Parameters:
Name Type Description
typedArrayOrSizeInBytes ArrayBufferView | Number A typed array containing the data to copy to the buffer, or a Number defining the size of the buffer in bytes.
usage BufferUsage Specifies the expected usage pattern of the buffer. On some GL implementations, this can significantly affect performance. See BufferUsage.
indexDatatype IndexDatatype The datatype of indices in the buffer.
Throws:
Returns:
IndexBuffer The index buffer, ready to be attached to a vertex array.
Example
// Example 1. Create a stream index buffer of unsigned shorts that is
// 16 bytes in size.
var buffer = context.createIndexBuffer(16, BufferUsage.STREAM_DRAW,
    IndexDatatype.UNSIGNED_SHORT);

////////////////////////////////////////////////////////////////////////////////

// Example 2. Create a static index buffer containing three unsigned shorts.
var buffer = context.createIndexBuffer(new Uint16Array([0, 1, 2]),
    BufferUsage.STATIC_DRAW, IndexDatatype.UNSIGNED_SHORT)
See:

DOC_TBA

See:
  • Context#pick

Creates a unique ID associated with the input object for use with color-buffer picking. The ID has an RGBA color value unique to this context. You must call destroy() on the pick ID when destroying the input object.

Parameters:
Name Type Description
object Object The object to associate with the pick ID.
Throws:
Returns:
Object A PickId object with a color property.
Example
this._pickId = context.createPickId(this);
See:

DOC_TBA.

Parameters:
Name Type Argument Description
description Object <optional>
DOC_TBA.
Throws:
Returns:
createRenderbuffer DOC_TBA.
See:

Validates and then finds or creates an immutable render state, which defines the pipeline state for a DrawCommand or ClearCommand. All inputs states are optional. Omitted states use the defaults shown in the example below.

Parameters:
Name Type Argument Default Description
renderState Object <optional>
undefined The states defining the render state as shown in the example below.
Throws:
  • RuntimeError : renderState.lineWidth is out of range.
  • DeveloperError : Invalid renderState.frontFace.
  • DeveloperError : Invalid renderState.cull.face.
  • DeveloperError : scissorTest.rectangle.width and scissorTest.rectangle.height must be greater than or equal to zero.
  • DeveloperError : renderState.depthRange.near can't be greater than renderState.depthRange.far.
  • DeveloperError : renderState.depthRange.near must be greater than or equal to zero.
  • DeveloperError : renderState.depthRange.far must be less than or equal to zero.
  • DeveloperError : Invalid renderState.depthTest.func.
  • DeveloperError : renderState.blending.color components must be greater than or equal to zero and less than or equal to one
  • DeveloperError : Invalid renderState.blending.equationRgb.
  • DeveloperError : Invalid renderState.blending.equationAlpha.
  • DeveloperError : Invalid renderState.blending.functionSourceRgb.
  • DeveloperError : Invalid renderState.blending.functionSourceAlpha.
  • DeveloperError : Invalid renderState.blending.functionDestinationRgb.
  • DeveloperError : Invalid renderState.blending.functionDestinationAlpha.
  • DeveloperError : Invalid renderState.stencilTest.frontFunction.
  • DeveloperError : Invalid renderState.stencilTest.backFunction.
  • DeveloperError : Invalid renderState.stencilTest.frontOperation.fail.
  • DeveloperError : Invalid renderState.stencilTest.frontOperation.zFail.
  • DeveloperError : Invalid renderState.stencilTest.frontOperation.zPass.
  • DeveloperError : Invalid renderState.stencilTest.backOperation.fail.
  • DeveloperError : Invalid renderState.stencilTest.backOperation.zFail.
  • DeveloperError : Invalid renderState.stencilTest.backOperation.zPass.
  • DeveloperError : renderState.viewport.width must be greater than or equal to zero.
  • DeveloperError : renderState.viewport.width must be less than or equal to the maximum viewport width.
  • DeveloperError : renderState.viewport.height must be greater than or equal to zero.
  • DeveloperError : renderState.viewport.height must be less than or equal to the maximum viewport height.
Example
var defaults = {
    frontFace : WindingOrder.COUNTER_CLOCKWISE,
    cull : {
        enabled : false,
        face : CullFace.BACK
    },
    lineWidth : 1,
    polygonOffset : {
        enabled : false,
        factor : 0,
        units : 0
    },
    scissorTest : {
        enabled : false,
        rectangle : {
            x : 0,
            y : 0,
            width : 0,
            height : 0
        }
    },
    depthRange : {
        near : 0,
        far : 1
    },
    depthTest : {
        enabled : false,
        func : DepthFunction.LESS
     },
    colorMask : {
        red : true,
        green : true,
        blue : true,
        alpha : true
    },
    depthMask : true,
    stencilMask : ~0,
    blending : {
        enabled : false,
        color : {
            red : 0.0,
            green : 0.0,
            blue : 0.0,
            alpha : 0.0
        },
        equationRgb : BlendEquation.ADD,
        equationAlpha : BlendEquation.ADD,
        functionSourceRgb : BlendFunction.ONE,
        functionSourceAlpha : BlendFunction.ONE,
        functionDestinationRgb : BlendFunction.ZERO,
        functionDestinationAlpha : BlendFunction.ZERO
    },
    stencilTest : {
        enabled : false,
        frontFunction : StencilFunction.ALWAYS,
        backFunction : StencilFunction.ALWAYS,
        reference : 0,
        mask : ~0,
        frontOperation : {
            fail : StencilOperation.KEEP,
            zFail : StencilOperation.KEEP,
            zPass : StencilOperation.KEEP
        },
        backOperation : {
            fail : StencilOperation.KEEP,
            zFail : StencilOperation.KEEP,
            zPass : StencilOperation.KEEP
        }
    },
    sampleCoverage : {
        enabled : false,
        value : 1.0,
        invert : false
     },
    dither : true
};

// Same as just context.createRenderState().
var rs = context.createRenderState(defaults);
See:

DOC_TBA

Throws:
See:

Creates a shader program given the GLSL source for a vertex and fragment shader.

The vertex and fragment shader are individually compiled, and then linked together to create a shader program. An exception is thrown if any errors are encountered, as described below.

The program's active uniforms and attributes are queried and can be accessed using the returned shader program. The caller can explicitly define the vertex attribute indices using the optional attributeLocations argument as shown in example two below.

Parameters:
Name Type Argument Default Description
vertexShaderSource String The GLSL source for the vertex shader.
fragmentShaderSource String The GLSL source for the fragment shader.
attributeLocations Object <optional>
undefined An optional object that maps vertex attribute names to indices for use with vertex arrays.
Throws:
Returns:
ShaderProgram The compiled and linked shader program, ready for use in a draw call.
Example
// Example 1. Create a shader program allowing the GL to determine
// attribute indices.
var vs = 'attribute vec4 position; void main() { gl_Position = position; }';
var fs = 'void main() { gl_FragColor = vec4(1.0); }';
var sp = context.createShaderProgram(vs, fs);

////////////////////////////////////////////////////////////////////////////////

// Example 2. Create a shader program with explicit attribute indices.
var vs = 'attribute vec4 position;' +
         'attribute vec3 normal;' +
         'void main() { ... }';
var fs = 'void main() { gl_FragColor = vec4(1.0); }';
var attributes = {
    position : 0,
    normal   : 1
};
sp = context.createShaderProgram(vs, fs, attributes);            *
See:

DOC_TBA. description.source can be {ImageData}, {HTMLImageElement}, {HTMLCanvasElement}, or {HTMLVideoElement}.

Throws:
  • RuntimeError : When description.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture.
  • RuntimeError : When description.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.
  • DeveloperError : description is required.
  • DeveloperError : description requires a source field to create an initialized texture or width and height fields to create a blank texture.
  • DeveloperError : Width must be greater than zero.
  • DeveloperError : Width must be less than or equal to the maximum texture size.
  • DeveloperError : Height must be greater than zero.
  • DeveloperError : Height must be less than or equal to the maximum texture size.
  • DeveloperError : Invalid description.pixelFormat.
  • DeveloperError : Invalid description.pixelDatatype.
  • DeveloperError : When description.pixelFormat is DEPTH_COMPONENT, description.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.
  • DeveloperError : When description.pixelFormat is DEPTH_STENCIL, description.pixelDatatype must be UNSIGNED_INT_24_8_WEBGL.
  • DeveloperError : When description.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.
Returns:
Texture DOC_TBA.
See:

Creates a texture, and copies a subimage of the framebuffer to it. When called without arguments, the texture is the same width and height as the framebuffer and contains its contents.

Parameters:
Name Type Argument Default Description
pixelFormat PixelFormat <optional>
PixelFormat.RGB The texture's internal pixel format.
framebufferXOffset PixelFormat <optional>
0 An offset in the x direction in the framebuffer where copying begins from.
framebufferYOffset PixelFormat <optional>
0 An offset in the y direction in the framebuffer where copying begins from.
width PixelFormat <optional>
canvas.clientWidth The width of the texture in texels.
height PixelFormat <optional>
canvas.clientHeight The height of the texture in texels.
Throws:
  • DeveloperError : Invalid pixelFormat.
  • DeveloperError : pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.
  • DeveloperError : framebufferXOffset must be greater than or equal to zero.
  • DeveloperError : framebufferYOffset must be greater than or equal to zero.
  • DeveloperError : framebufferXOffset + width must be less than or equal to getCanvas().clientWidth.
  • DeveloperError : framebufferYOffset + height must be less than or equal to getCanvas().clientHeight.
Returns:
Texture A texture with contents from the framebuffer.
Example
// Create a texture with the contents of the framebuffer.
var t = context.createTexture2DFromFramebuffer();
See:

Creates a new texture atlas with this context.

Parameters:
Name Type Argument Default Description
description.pixelFormat PixelFormat <optional>
PixelFormat.RGBA The pixel format of the texture.
description.borderWidthInPixels Number <optional>
1 The amount of spacing between adjacent images in pixels.
description.initialSize Cartesian2 <optional>
new Cartesian2(16.0, 16.0) The initial side lengths of the texture.
description.images Array <optional>
undefined Array of Image to be added to the atlas. Same as calling addImages(images).
description.image Image <optional>
undefined Single image to be added to the atlas. Same as calling addImage(image).
Returns:
TextureAtlas The new texture atlas.
See:

Creates a vertex array, which defines the attributes making up a vertex, and contains an optional index buffer to select vertices for rendering. Attributes are defined using object literals as shown in Example 1 below.

Parameters:
Name Type Argument Default Description
attributes Array <optional>
undefined An optional array of attributes.
indexBuffer IndexBuffer <optional>
undefined An optional index buffer.
Throws:
  • DeveloperError : Attribute must have a vertexBuffer.
  • DeveloperError : Attribute must have a componentsPerAttribute.
  • DeveloperError : Attribute must have a valid componentDatatype or not specify it.
  • DeveloperError : Attribute must have a strideInBytes less than or equal to 255 or not specify it.
  • DeveloperError : Index n is used by more than one attribute.
Returns:
VertexArray The vertex array, ready for use with drawing.
Example
// Example 1. Create a vertex array with vertices made up of three floating point
// values, e.g., a position, from a single vertex buffer.  No index buffer is used.
var positionBuffer = context.createVertexBuffer(12, BufferUsage.STATIC_DRAW);
var attributes = [
    {
        index                  : 0,
        enabled                : true,
        vertexBuffer           : positionBuffer,
        componentsPerAttribute : 3,
        componentDatatype      : ComponentDatatype.FLOAT,
        normalize              : false,
        offsetInBytes          : 0,
        strideInBytes          : 0 // tightly packed
    }
];
var va = context.createVertexArray(attributes);

////////////////////////////////////////////////////////////////////////////////

// Example 2. Create a vertex array with vertices from two different vertex buffers.
// Each vertex has a three-component position and three-component normal.
var positionBuffer = context.createVertexBuffer(12, BufferUsage.STATIC_DRAW);
var normalBuffer = context.createVertexBuffer(12, BufferUsage.STATIC_DRAW);
var attributes = [
    {
        index                  : 0,
        vertexBuffer           : positionBuffer,
        componentsPerAttribute : 3,
        componentDatatype      : ComponentDatatype.FLOAT
    },
    {
        index                  : 1,
        vertexBuffer           : normalBuffer,
        componentsPerAttribute : 3,
        componentDatatype      : ComponentDatatype.FLOAT
    }
];
var va = context.createVertexArray(attributes);

////////////////////////////////////////////////////////////////////////////////

// Example 3. Creates the same vertex layout as Example 2 using a single
// vertex buffer, instead of two.
var buffer = context.createVertexBuffer(24, BufferUsage.STATIC_DRAW);
var attributes = [
    {
        vertexBuffer           : buffer,
        componentsPerAttribute : 3,
        componentDatatype      : ComponentDatatype.FLOAT,
        offsetInBytes          : 0,
        strideInBytes          : 24
    },
    {
        vertexBuffer           : buffer,
        componentsPerAttribute : 3,
        componentDatatype      : ComponentDatatype.FLOAT,
        normalize              : true,
        offsetInBytes          : 12,
        strideInBytes          : 24
    }
];
var va = context.createVertexArray(attributes);
See:

Creates a vertex array from a geometry. A geometry contains vertex attributes and optional index data in system memory, whereas a vertex array contains vertex buffers and an optional index buffer in WebGL memory for use with rendering.

The geometry argument should use the standard layout like the geometry returned by BoxGeometry.

creationArguments can have four properties:

  • geometry: The source geometry containing data used to create the vertex array.
  • attributeIndices: An object that maps geometry attribute names to vertex shader attribute indices.
  • bufferUsage: The expected usage pattern of the vertex array's buffers. On some WebGL implementations, this can significantly affect performance. See BufferUsage. Default: BufferUsage.DYNAMIC_DRAW.
  • vertexLayout: Determines if all attributes are interleaved in a single vertex buffer or if each attribute is stored in a separate vertex buffer. Default: VertexLayout.SEPARATE.

If creationArguments is not specified or the geometry contains no data, the returned vertex array is empty.

Parameters:
Name Type Argument Default Description
creationArguments Object <optional>
undefined An object defining the geometry, attribute indices, buffer usage, and vertex layout used to create the vertex array.
Throws:
  • RuntimeError : Each attribute list must have the same number of vertices.
  • DeveloperError : The geometry must have zero or one index lists.
  • DeveloperError : Index n is used by more than one attribute.
Example
// Example 1. Creates a vertex array for rendering a box.  The default dynamic draw
// usage is used for the created vertex and index buffer.  The attributes are not
// interleaved by default.
var geometry = new BoxGeometry();
var va = context.createVertexArrayFromGeometry({
    geometry             : geometry,
    attributeIndices : GeometryPipeline.createAttributeIndices(geometry),
});

////////////////////////////////////////////////////////////////////////////////

// Example 2. Creates a vertex array with interleaved attributes in a
// single vertex buffer.  The vertex and index buffer have static draw usage.
var va = context.createVertexArrayFromGeometry({
    geometry             : geometry,
    attributeIndices : GeometryPipeline.createAttributeIndices(geometry),
    bufferUsage      : BufferUsage.STATIC_DRAW,
    vertexLayout     : VertexLayout.INTERLEAVED
});

////////////////////////////////////////////////////////////////////////////////

// Example 3.  When the caller destroys the vertex array, it also destroys the
// attached vertex buffer(s) and index buffer.
va = va.destroy();
See:

Creates a vertex buffer, which contains untyped vertex data in GPU-controlled memory.

A vertex array defines the actual makeup of a vertex, e.g., positions, normals, texture coordinates, etc., by interpreting the raw data in one or more vertex buffers.

Parameters:
Name Type Description
typedArrayOrSizeInBytes ArrayBufferView | Number A typed array containing the data to copy to the buffer, or a Number defining the size of the buffer in bytes.
usage BufferUsage Specifies the expected usage pattern of the buffer. On some GL implementations, this can significantly affect performance. See BufferUsage.
Throws:
Returns:
VertexBuffer The vertex buffer, ready to be attached to a vertex array.
Example
// Example 1. Create a dynamic vertex buffer 16 bytes in size.
var buffer = context.createVertexBuffer(16, BufferUsage.DYNAMIC_DRAW);

////////////////////////////////////////////////////////////////////////////////

// Example 2. Create a dynamic vertex buffer from three floating-point values.
// The data copied to the vertex buffer is considered raw bytes until it is
// interpreted as vertices using a vertex array.
var positionBuffer = context.createVertexBuffer(new Float32Array([0, 0, 0]),
    BufferUsage.STATIC_DRAW);
See:

Executes the specified draw command.

Parameters:
Name Type Argument Description
drawCommand DrawCommand The command with which to draw.
passState PassState <optional>
The state for the current rendering pass
Throws:
Example
// Example 1.  Draw a single triangle specifying only required arguments
context.draw({
    primitiveType : PrimitiveType.TRIANGLES,
    shaderProgram : sp,
    vertexArray   : va,
});

////////////////////////////////////////////////////////////////////////////////

// Example 2.  Draw a single triangle specifying every argument
context.draw({
    primitiveType : PrimitiveType.TRIANGLES,
    offset        : 0,
    count         : 3,
    framebuffer   : fb,
    shaderProgram : sp,
    vertexArray   : va,
    renderState   : rs
});
See:

DOC_TBA

Returns the number of alpha bits per component in the default framebuffer's color buffer. The minimum is eight.

The alpha channel is used for GL destination alpha operations and by the HTML compositor to combine the color buffer with the rest of the page.

Returns:
Number The number of alpha bits per component in the color buffer.
See:

Returns true if the WebGL context supports antialiasing. By default antialiasing is requested, but it is not supported by all systems.

Returns:
Boolean true if antialiasing is supported.

Returns the number of blue bits per component in the default framebuffer's color buffer. The minimum is eight.

Returns:
Number The number of blue bits per component in the color buffer.
See:

Returns the canvas assoicated with this context.

Returns:
HTMLCanvasElement The canvas assoicated with this context.

Returns a cube map, where each face is a 1x1 RGBA texture initialized to [255, 255, 255, 255]. This can be used as a placeholder cube map while other cube maps are downloaded.

Returns:

Returns a 1x1 RGBA texture initialized to [255, 255, 255, 255]. This can be used as a placeholder texture while other textures are downloaded.

Returns:

Returns the number of depth bits per pixel in the default bound framebuffer. The minimum is 16 bits; most implementations will have 24 bits.

Returns:
Number The number of depth bits per pixel in the default bound framebuffer.
See:

Returns true if WEBGL_depth_texture is supported. This extension provides access to depth textures that, for example, can be attached to framebuffers for shadow mapping.

Returns:
Boolean true if WEBGL_depth_texture is supported; otherwise, false.
See:

Returns true if the OES_element_index_uint extension is supported. This extension allows the use of unsigned int indices, which can improve performance by eliminating batch breaking caused by unsigned short indices.

Returns:
Boolean true if OES_element_index_uint is supported; otherwise, false.
See:

Returns true if OES_texture_float is supported. This extension provides access to floating point textures that, for example, can be attached to framebuffers for high dynamic range.

Returns:
Boolean true if OES_texture_float is supported; otherwise, false.
See:

Returns the number of green bits per component in the default framebuffer's color buffer. The minimum is eight.

Returns:
Number The number of green bits per component in the color buffer.
See:

Returns a unique ID for this context.

Returns:
String A unique ID for this context.

DOC_TBA

See:

Returns the maximum aliased line width, in pixels, supported by this WebGL implementation. It will be at least one.

Returns:
Number The maximum aliased line in pixels.
See:

Returns the maximum aliased point size, in pixels, supported by this WebGL implementation. It will be at least one.

Returns:
Number The maximum aliased point size in pixels.
See:

Returns the maximum number of texture units that can be used from the vertex and fragment shader with this WebGL implementation. The minimum is eight. If both shaders access the same texture unit, this counts as two texture units.

Returns:
Number The maximum supported texture image units.
See:

Returns the approximate maximum cube mape width and height supported by this WebGL implementation. The minimum is 16, but most desktop and laptop implementations will support much larger sizes like 8,192.

Returns:
Number The approximate maximum cube mape width and height.
See:

Returns the maximum number of vec4, ivec4, and bvec4 uniforms that can be used by a fragment shader with this WebGL implementation. The minimum is 16.

Returns:
Number The maximum number of vec4, ivec4, and bvec4 uniforms that can be used by a fragment shader.
See:

Returns the maximum renderbuffer width and height supported by this WebGL implementation. The minimum is 16, but most desktop and laptop implementations will support much larger sizes like 8,192.

Returns:
Number The maximum renderbuffer width and height.
See:

DOC_TBA

See:

Returns the maximum number of texture units that can be used from the fragment shader with this WebGL implementation. The minimum is eight.

Returns:
Number The maximum number of texture units that can be used from the fragment shader.
See:

Returns the approximate maximum texture width and height supported by this WebGL implementation. The minimum is 64, but most desktop and laptop implementations will support much larger sizes like 8,192.

Returns:
Number The approximate maximum texture width and height.
See:

Returns the maximum number of vec4 varying variables supported by this WebGL implementation. The minimum is eight. Matrices and arrays count as multiple vec4s.

Returns:
Number Returns the maximum number of vec4 varying variables.
See:
  • glGet with MAX_VARYING_VECTORS.

Returns the maximum number of vec4 vertex attributes supported by this WebGL implementation. The minimum is eight.

Returns:
Number The maximum number of vec4 vertex attributes.
See:

Returns the maximum number of texture units that can be used from the vertex shader with this WebGL implementation. The minimum is zero, which means the GL does not support vertex texture fetch.

Returns:
Number The maximum number of texture units that can be used from the vertex shader.
See:

Returns the maximum number of vec4, ivec4, and bvec4 uniforms that can be used by a vertex shader with this WebGL implementation. The minimum is 16.

Returns:
Number The maximum number of vec4, ivec4, and bvec4 uniforms that can be used by a vertex shader.
See:

Returns the maximum supported height of the viewport. It will be at least as large as the visible height of the associated canvas.

Returns:
Number The maximum supported height of the viewport.
See:

Returns the maximum supported width of the viewport. It will be at least as large as the visible width of the associated canvas.

Returns:
Number The maximum supported width of the viewport.
See:

Returns the minimum aliased line width, in pixels, supported by this WebGL implementation. It will be at most one.

Returns:
Number The minimum aliased line in pixels.
See:

Returns the minimum aliased point size, in pixels, supported by this WebGL implementation. It will be at most one.

Returns:
Number The minimum aliased point size in pixels.
See:

Gets the object associated with a pick color.

Parameters:
Name Type Description
The Color pick color.
Throws:
DeveloperError : pickColor is required.
Returns:
Object The object associated with the pick color, or undefined if no object is associated with that color.
Example
var object = context.getObjectByPickColor(pickColor);
See:

Returns the number of red bits per component in the default framebuffer's color buffer. The minimum is eight.

Returns:
Number The number of red bits per component in the color buffer.
See:

Returns the name of the renderer/configuration/hardware platform. For example, this may be the model of the video card, e.g., 'GeForce 8800 GTS/PCI/SSE2', or the browser-dependent name of the GL implementation, e.g. 'Mozilla' or 'ANGLE.'

Returns:
String The name of the renderer.
See:

DOC_TBA

See:

Returns the version or release number for the shading language of the form WebGL<space>GLSL<space>ES<space><version number><space><vendor-specific information>.

Returns:
String The version or release number for the shading language.
See:

Returns true if the OES_standard_derivatives extension is supported. This extension provides access to dFdx, dFdy, and fwidth functions from GLSL. A shader using these functions still needs to explicitly enable the extension with #extension GL_OES_standard_derivatives : enable.

Returns:
Boolean true if OES_standard_derivatives is supported; otherwise, false.
See:

Returns the number of stencil bits per pixel in the default bound framebuffer. The minimum is eight bits.

Returns:
Number The number of stencil bits per pixel in the default bound framebuffer.
See:
  • glGet with STENCIL_BITS.

DOC_TBA

Returns:
Boolean true if EXT_texture_filter_anisotropic is supported; otherwise, false.
See:

DOC_TBA

See:

DOC_TBA

DOC_TBA

See:

DOC_TBA

See:

Returns the company responsible for the WebGL implementation.

Returns:
String The company responsible for the WebGL implementation.
See:

Returns the WebGL version or release number of the form <WebGL><space><version number><space><vendor-specific information>.

Returns:
String The WebGL version or release number.
See:

Returns true if the OES_vertex_array_object extension is supported. This extension can improve performance by reducing the overhead of switching vertex arrays. When enabled, this extension is automatically used by VertexArray.

Returns:
Boolean true if OES_vertex_array_object is supported; otherwise, false.
See:

DOC_TBA

Throws:

DOC_TBA

See:

DOC_TBA

Performance:

DOC_TBA: slow.

See:

DOC_TBA

Performance:

DOC_TBA: slow.

See:

DOC_TBA

Performance:

DOC_TBA: slow.

See:
Documentation generated by JSDoc 3 on Thu Aug 01 2013 13:39:13 GMT-0400 (EDT)