Name | Type | Description |
---|---|---|
renderer |
WebGLRenderer |
The renderer this System works for. |
Implements
Members
defaultOptions ContextSystemOptions static
The default options for the system.
Properties:
Name | Type | Default | Description |
---|---|---|---|
context |
null
|
WebGLOptions.context |
|
multiView |
boolean |
false
|
WebGLOptions.multiView |
powerPreference |
default
|
WebGLOptions.powerPreference |
|
preferWebGLVersion |
number |
2
|
WebGLOptions.webGLVersion |
premultipliedAlpha |
boolean |
true
|
WebGLOptions.premultipliedAlpha |
preserveDrawingBuffer |
boolean |
false
|
WebGLOptions.preserveDrawingBuffer |
canvas ICanvas readonly
The canvas that the WebGL Context is rendering to. This will be the view canvas. But if multiView is enabled, this canvas will not be attached to the DOM. It will be rendered to and then copied to the target canvas.
Extensions available.
Properties:
Name | Type | Description |
---|---|---|
anisotropicFiltering |
EXT_texture_filter_anisotropic |
WebGL v1 and v2 extension |
depthTexture |
WEBGL_depth_texture |
WebGL v1 extension |
drawBuffers |
WEBGL_draw_buffers |
WebGL v1 extension |
floatTexture |
OES_texture_float |
WebGL v1 extension |
loseContext |
WEBGL_lose_context |
WebGL v1 extension |
vertexArrayObject |
OES_vertex_array_object |
WebGL v1 extension |
true
if the context is lost
Whether to enable multi-view rendering. Set to true when rendering to multiple canvases on the dom.
- Default Value:
- false
Features supported by current renderer.
Properties:
Name | Type | Default | Description |
---|---|---|---|
msaa |
boolean |
true
|
Support for MSAA (antialiasing of dynamic textures) |
nonPowOf2mipmaps |
boolean |
true
|
Support for mipmaps if a texture is non-power of two |
nonPowOf2wrapping |
boolean |
true
|
Support for wrapping modes if a texture is non-power of two |
srgbTextures |
boolean |
true
|
Support for SRGB texture format |
uint32Indices |
boolean |
true
|
Support for 32-bit indices buffer. |
uniformBufferObject |
boolean |
true
|
Support for UniformBufferObjects |
vertexArrayObject |
boolean |
true
|
Support for VertexArrayObjects |
Methods
this function can be called to force a webGL context loss this will release all resources on the GPU. Useful if you need to put Pixi to sleep, and save some GPU memory
As soon as render is called - all resources will be created again.
Handles the context change event.
Name | Type | Description |
---|---|---|
gl |
WebGLRenderingContext |
New WebGL context. |
Initialize from context options
Name | Type | Description |
---|---|---|
preferWebGLVersion |
1 | 2 | |
options |
object |
context attributes |
Auto-populate the extensions.
Handles a lost webgl context
Name | Type | Description |
---|---|---|
event |
WebGLContextEvent |
The context lost event. |
Handles a restored webgl context.
Initializes the context.
Name | Type | Description |
---|---|---|
gl |
WebGLRenderingContext |
WebGL context |
Validate context.
Name | Type | Description |
---|---|---|
gl |
WebGLRenderingContext |
Render context. |