Class: GlShaderSystem

GlShaderSystem

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

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