PIXI.ContextSystem
class ContextSystem implements PIXI.ISystem
System plugin to the renderer to manage the context.
Constructor
new PIXI.ContextSystem(renderer: PIXI.Renderer) → {}
Name | Type | Description |
---|---|---|
renderer | PIXI.Renderer |
The renderer this System works for. |
Summary
Properties from ContextSystem
object |
|
boolean |
|
object |
|
number |
|
Methods from ContextSystem
WebGLRenderingContext |
|
void |
|
void |
Auto-populate the extensions. |
void |
|
void |
Handles a restored webgl context. |
void |
|
void |
|
void |
Handle the post-render runner event. |
void |
|
Public Properties
extensions: object
Extensions available.
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 |
supports: object
Features supported by current context.
Name | Type | Description |
---|---|---|
uint32Indices | boolean | Support for 32-bit indices buffer. |
webGLVersion: number
Either 1 or 2 to reflect the WebGL version being used.
Public Methods
createContext(canvas: HTMLCanvasElement, options: WebGLContextAttributes) → {WebGLRenderingContext}
Helper class to create a WebGL Context
Name | Type | Description |
---|---|---|
canvas | HTMLCanvasElement |
the canvas element that we will get the context from |
options | WebGLContextAttributes |
An options object that gets passed in to the canvas element containing the context attributes |
Type | Description |
---|---|
WebGLRenderingContext |
the WebGL context |
Protected Methods
protected contextChange(gl: WebGLRenderingContext) → {void}
Handles the context change event.
Name | Type | Description |
---|---|---|
gl | WebGLRenderingContext |
New WebGL context. |
Type | Description |
---|---|
void |
protected getExtensions() → {void}
Auto-populate the extensions.
Type | Description |
---|---|
void |
protected handleContextLost(event: WebGLContextEvent) → {void}
Handles a lost webgl context
Name | Type | Description |
---|---|---|
event | WebGLContextEvent |
The context lost event. |
Type | Description |
---|---|
void |
protected handleContextRestored() → {void}
Handles a restored webgl context.
Type | Description |
---|---|
void |
protected initFromContext(gl: WebGLRenderingContext) → {void}
Initializes the context.
Name | Type | Description |
---|---|---|
gl | WebGLRenderingContext |
WebGL context |
Type | Description |
---|---|
void |
protected initFromOptions(options: object) → {void}
Initialize from context options
Name | Type | Description |
---|---|---|
options | object |
context attributes |
Type | Description |
---|---|
void |
protected postrender() → {void}
Handle the post-render runner event.
Type | Description |
---|---|
void |
protected validateContext(gl: WebGLRenderingContext) → {void}
Validate context.
Name | Type | Description |
---|---|---|
gl | WebGLRenderingContext |
Render context. |
Type | Description |
---|---|
void |