Home Reference Source
public class | source

ShaderModifier

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

needsTexturePush: boolean

public

opId: *

Private Members
private
private
private

_cgl: *

private

_changedDefines: boolean

private

_changedUniforms: boolean

private

_defines: {}

private
private
private

_mods: *[]

private

_modulesChanged: boolean

private

_name: *

private
private
private

_textures: *[]

private

_uniforms: *[]

Method Summary

Public Methods
public

addAttribute(attr: *)

public

addModule(mod: *)

public

addUniform(type: *, name: *, valOrPort: *, v2: *, v3: *, v4: *, structUniformName: *, structName: *, propertyName: *, shaderType: *)

public

addUniformBoth(type: *, name: *, valOrPort: *, v2: *, v3: *, v4: *)

public

addUniformFrag(type: *, name: *, valOrPort: *, v2: *, v3: *, v4: *)

public

addUniformStruct(structName: *, uniformName: *, members: *, shaderType: *)

public

addUniformStructBoth(structName: *, uniformName: *, members: *)

public

addUniformStructFrag(structName: *, uniformName: *, members: *)

public

addUniformStructVert(structName: *, uniformName: *, members: *)

public

addUniformVert(type: *, name: *, valOrPort: *, v2: *, v3: *, v4: *)

public

bind(curShader: *, pushShader: *): *

public
public

define(what: *, value: *)

public
public

getPrefixedName(name: *): *

public

hasDefine(name: *): boolean

public

hasUniform(name: *): *

public

pushTexture(uniformName: *, tex: *, texType: *)

public

removeDefine(name: *)

public

removeModule(title: *)

public

removeUniform(name: *)

public

removeUniformStruct(uniformName: *)

public

setUniformValue(name: *, value: *)

public

toggleDefine(name: *, b: *)

public

unbind(popShader: *)

Private Methods
private

_addModulesToShader(shader: *)

private

_getStructUniform(uniName: *): *

private

_getUniform(name: *): boolean

private

_isStructUniform(name: *): boolean

private
private

_removeUniformFromShader(name: *, shader: *)

private

_setUniformValue(shader: *, uniformName: *, value: *)

private
private
private
private

Public Constructors

public constructor() source

Public Members

public needsTexturePush: boolean source

public opId: * source

Private Members

private _attributes: *[] source

private _boundShader: * source

private _cgl: * source

private _changedDefines: boolean source

private _changedUniforms: boolean source

private _defines: {} source

private _definesToggled: {} source

private _lastShader: * source

private _mods: *[] source

private _modulesChanged: boolean source

private _name: * source

private _origShaders: {} source

private _structUniforms: *[] source

private _textures: *[] source

private _uniforms: *[] source

Public Methods

public addAttribute(attr: *) source

Params:

NameTypeAttributeDescription
attr *

public addModule(mod: *) source

Params:

NameTypeAttributeDescription
mod *

public addUniform(type: *, name: *, valOrPort: *, v2: *, v3: *, v4: *, structUniformName: *, structName: *, propertyName: *, shaderType: *) source

Params:

NameTypeAttributeDescription
type *
name *
valOrPort *
v2 *
v3 *
v4 *
structUniformName *
structName *
propertyName *
shaderType *

public addUniformBoth(type: *, name: *, valOrPort: *, v2: *, v3: *, v4: *) source

Params:

NameTypeAttributeDescription
type *
name *
valOrPort *
v2 *
v3 *
v4 *

public addUniformFrag(type: *, name: *, valOrPort: *, v2: *, v3: *, v4: *) source

Params:

NameTypeAttributeDescription
type *
name *
valOrPort *
v2 *
v3 *
v4 *

public addUniformStruct(structName: *, uniformName: *, members: *, shaderType: *) source

Params:

NameTypeAttributeDescription
structName *
uniformName *
members *
shaderType *

public addUniformStructBoth(structName: *, uniformName: *, members: *) source

Params:

NameTypeAttributeDescription
structName *
uniformName *
members *

public addUniformStructFrag(structName: *, uniformName: *, members: *) source

Params:

NameTypeAttributeDescription
structName *
uniformName *
members *

public addUniformStructVert(structName: *, uniformName: *, members: *) source

Params:

NameTypeAttributeDescription
structName *
uniformName *
members *

public addUniformVert(type: *, name: *, valOrPort: *, v2: *, v3: *, v4: *) source

Params:

NameTypeAttributeDescription
type *
name *
valOrPort *
v2 *
v3 *
v4 *

public bind(curShader: *, pushShader: *): * source

Params:

NameTypeAttributeDescription
curShader *
pushShader *

Return:

*

public currentShader(): * source

Return:

*

public define(what: *, value: *) source

Params:

NameTypeAttributeDescription
what *
value *

public dispose() source

public getPrefixedName(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public hasDefine(name: *): boolean source

Params:

NameTypeAttributeDescription
name *

Return:

boolean

public hasUniform(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public pushTexture(uniformName: *, tex: *, texType: *) source

Params:

NameTypeAttributeDescription
uniformName *
tex *
texType *

public removeDefine(name: *) source

Params:

NameTypeAttributeDescription
name *

public removeModule(title: *) source

Params:

NameTypeAttributeDescription
title *

public removeUniform(name: *) source

Params:

NameTypeAttributeDescription
name *

public removeUniformStruct(uniformName: *) source

Params:

NameTypeAttributeDescription
uniformName *

public setUniformValue(name: *, value: *) source

Params:

NameTypeAttributeDescription
name *
value *

public toggleDefine(name: *, b: *) source

Params:

NameTypeAttributeDescription
name *
b *

public unbind(popShader: *) source

Params:

NameTypeAttributeDescription
popShader *

Private Methods

private _addModulesToShader(shader: *) source

Params:

NameTypeAttributeDescription
shader *

private _getStructUniform(uniName: *): * source

Params:

NameTypeAttributeDescription
uniName *

Return:

*

private _getUniform(name: *): boolean source

Params:

NameTypeAttributeDescription
name *

Return:

boolean

private _isStructUniform(name: *): boolean source

Params:

NameTypeAttributeDescription
name *

Return:

boolean

private _removeModulesFromShader(mod: *) source

Params:

NameTypeAttributeDescription
mod *

private _removeUniformFromShader(name: *, shader: *) source

Params:

NameTypeAttributeDescription
name *
shader *

private _setUniformValue(shader: *, uniformName: *, value: *) source

Params:

NameTypeAttributeDescription
shader *
uniformName *
value *

private _updateDefines() source

private _updateDefinesShader(shader: *) source

Params:

NameTypeAttributeDescription
shader *

private _updateUniforms() source

private _updateUniformsShader(shader: *) source

Params:

NameTypeAttributeDescription
shader *