Class: GlShaderSystem

GlShaderSystem

System plugin to the renderer to manage the shaders for WebGL.

Members

_shaderSyncFunctions

these need to also be cleared as internally some uniforms are set as an optimisation as the sync function is generated. Specifically the texture ints.

Methods

bind (shader, skipSync) void

Changes the current shader to the one given in parameter.

Name Type Attributes Description
shader Shader

the new shader

skipSync boolean <optional>

false if the shader should automatically sync its uniforms.

bindUniformBlock (uniformGroup, name, index) void

Binds a uniform block to the shader.

Name Type Default Description
uniformGroup UniformGroup | BufferResource

the uniform group to bind

name string

the name of the uniform block

index number 0

the index of the uniform block

updateUniformGroup (uniformGroup) void

Updates the uniform group.

Name Type Description
uniformGroup UniformGroup

the uniform group to update