-
-
true
if the WebGL context supports antialiasing. By default
antialiasing is requested, but it is not supported by all systems.
-
-
A cache of objects tied to this context. Just before the Context is destroyed,
destroy
will be invoked on each object in this object literal that has
such a method. This is useful for caching any objects that might otherwise
be stored globally, except they're tied to a particular context, and to manage
their lifetime.
-
-
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.
-
defaultFramebuffer : Object
-
Gets an object representing the currently bound framebuffer. While this instance is not an actual
Framebuffer
, it is used to represent the default framebuffer in calls to
Texture.FromFramebuffer
.
-
-
A 1x1 RGBA texture initialized to [255, 255, 255, 255]. This can
be used as a placeholder texture while other textures are downloaded.
-
-
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.
See:
-
-
true
if the WEBGL_draw_buffers extension is supported. This
extensions provides support for multiple render targets. The framebuffer object can have mutiple
color attachments and the GLSL fragment shader can write to the built-in output array gl_FragData
.
A shader using this feature needs to explicitly enable the extension with
#extension GL_EXT_draw_buffers : enable
.
See:
-
drawingBufferHeight : Number
-
The drawingBufferHeight of the underlying GL context.
See:
-
drawingBufferWidth : Number
-
The drawingBufferWidth of the underlying GL context.
See:
-
elementIndexUint : Boolean
-
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.
See:
-
-
true
if WEBGL_texture_compression_etc1 is supported. This extension provides
access to ETC1 compressed textures.
See:
-
floatingPointTexture : Boolean
-
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.
See:
-
-
true
if the EXT_frag_depth extension is supported. This
extension provides access to the gl_FragDepthEXT
built-in output variable
from GLSL fragment shaders. A shader using these functions still needs to explicitly enable the
extension with #extension GL_EXT_frag_depth : enable
.
See:
-
instancedArrays : Boolean
-
true
if the ANGLE_instanced_arrays extension is supported. This
extension provides access to instanced rendering.
See:
-
-
设置场景总的显存资源占用阈值,默认值:4G,单位GB。
根据机器内存显存大小适当调整这个值,避免因资源占满导致崩溃。
-
-
Example:
{
webgl : {
alpha : false,
depth : true,
stencil : false,
antialias : true,
premultipliedAlpha : true,
preserveDrawingBuffer : false,
failIfMajorPerformanceCaveat : true
},
allowTextureFilterAnisotropic : true
}
-
-
true
if WEBGL_texture_compression_pvrtc is supported. This extension provides
access to PVR compressed textures.
See:
-
-
true
if WEBGL_texture_compression_s3tc is supported. This extension provides
access to DXT compressed textures.
See:
-
standardDerivatives : Boolean
-
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
.
See:
-
-
The number of stencil bits per pixel in the default bound framebuffer. The minimum is eight bits.
See:
-
-
true
if the WebGL context supports stencil buffers.
Stencil buffers are not supported by all systems.
-
vertexArrayObject : Boolean
-
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
.
See: