Phaser API Documentation

  Version: 
Filter

Wrapper for a WebGL uniform location, containing all the information that was used to create it.

A WebGLUniformLocation should never be exposed outside the WebGLRenderer, so the WebGLRenderer can handle context loss and other events without other systems having to be aware of it. Always use WebGLUniformLocationWrapper instead.

Constructor:

new WebGLUniformLocationWrapper(gl, program, name)

Parameters:

name type description
gl WebGLRenderingContext

The WebGLRenderingContext to create the WebGLUniformLocation for.

program Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper

The WebGLProgram that this location refers to. This must be created first.

name string

The name of this location, as defined in the shader source code.

Members

gl: WebGLRenderingContext
Focus
Focus

Description:

The WebGLRenderingContext that owns this location.

Type:
WebGLRenderingContext
Focus
Focus
name: string
Focus
Focus

Description:

The name of this location, as defined in the shader source code.

Type:
string
Focus
Focus

Description:

The WebGLProgram that this location refers to.

Type:
Focus
Focus
<nullable> webGLUniformLocation: WebGLUniformLocation
Focus
Focus

Description:

The WebGLUniformLocation being wrapped by this class.

This property could change at any time. Therefore, you should never store a reference to this value. It should only be passed directly to the WebGL API for drawing.

Type:
WebGLUniformLocation
Default: null
Focus
Focus

Methods

createResource()
Focus
Focus

Description:

Creates the WebGLUniformLocation.

Focus
Focus
destroy()
Focus
Focus

Description:

Destroys this WebGLUniformLocationWrapper.

Focus
Focus