Home Reference Source
public class | source

L_AbstractMaterial

Extends:

GLBoostObject → L_AbstractMaterial

Constructor Summary

Public Constructor
public

constructor(glBoostContext: *)

Member Summary

Public Members
public get
public set
public get
public set
public get
public set
public get
public set
public get

name: *

public set

name: *

public get
public set
public get
public set
public get
public set
public get

states: *

public set

states: *

Private Members
private
private
private

_gl: *

private
private
private
private
private
private
private
private
private
private

_stateFunctionsToReset: {"blendColor": *, "blendEquationSeparate": *, "blendFuncSeparate": *, "colorMask": *, "cullFace": *, "depthFunc": *, "depthMask": *, "depthRange": *, "frontFace": *, "lineWidth": *, "polygonOffset": *}

private

_states: {"enable": *, "functions": *}

private
private
private
private
private

Method Summary

Public Methods
public

addSemanticsDic(uniform: *, uniformName: *)

public

clone(): *

public
public

getTexture(userFlavorName: *): *

public

getTextureContributionRate(textureUserFlavorName: *): *

public

getTextureFromPurpose(purpose: *): *

public
public
public

getTexturePurpose(userFlavorNameOfTexture: *): *

public
public

getUniform(glslProgram: *, uniformLocationName: *): *

public
public

getVertexN(geom: *): *

public
public
public
public

registerTextureUnitToUniform(texturePurpose: *, shaderProgram: *, uniformName: *)

public

removeSemanticsDic(uniform: *)

public

removeTexture(userFlavorName: *, discardTexture: *)

public
public
public

setTexture(texture: *, purpose: *)

public

setTextureContributionRate(textureUserFlavorName: *, rateVec4: *)

public

setTexturePurpose(userFlavorNameOfTexture: *, purpose: *)

public

setUniform(glslProgram: *, uniformLocationName: *, uniformLocation: *)

public

setUpStates(mesh: *)

public

setUpTexture(textureName: *, textureUnitIndex: *): *

bind the texture.

public

setVertexN(geom: *, num: *)

public
public

tearDownTexture(textureName: *, textureUnitIndex: *)

public

updateTextureInfo(texturePurpose: *, uniformName: *)

Private Methods
private
private

Inherited Summary

From class GLBoostObject
public static
private static
private static
public get
public get
public get

Return the simple class-specific number.

public get
public get
public get
public get
public get
public get
public set
private
private
private
private
private
private
private
private
private
private
public
public
public
public

Return instance name.

public
private

_copy(instance: *)

private

Public Constructors

public constructor(glBoostContext: *) source

Override:

GLBoostObject#constructor

Params:

NameTypeAttributeDescription
glBoostContext *

Public Members

public get alphaCutoff: * source

public set alphaCutoff: * source

public get globalStatesUsage: * source

public set globalStatesUsage: * source

public get isAlphaTest: * source

public set isAlphaTest: * source

public get isVisible: * source

public set isVisible: * source

public get name: * source

public set name: * source

public get shaderClass: * source

public set shaderClass: * source

public get shaderInstance: * source

public set shaderInstance: * source

public get shaderParameters: * source

public set shaderParameters: * source

public get states: * source

public set states: * source

Private Members

private _alphaCutoff: number source

private _countOfUpdate: number source

private _gl: * source

private _globalStatesUsage: * source

private _isAlphaTestEnable: boolean source

private _isVisibleForGeometiesAssginedByThisMaterial: boolean source

private _name: string source

private _semanticsDic: {} source

private _shaderClass: * source

private _shaderInstance: * source

private _shaderParametersForShaderInstance: {} source

private _shaderUniformLocationsOfExpressions: {} source

private _stateFunctionsToReset: {"blendColor": *, "blendEquationSeparate": *, "blendFuncSeparate": *, "colorMask": *, "cullFace": *, "depthFunc": *, "depthMask": *, "depthRange": *, "frontFace": *, "lineWidth": *, "polygonOffset": *} source

private _states: {"enable": *, "functions": *} source

private _textureContributionRateDic: {} source

private _textureDic: {} source

private _texturePurposeDic: *[] source

private _textureSemanticsDic: {} source

private _vertexNofGeometries: {} source

Public Methods

public addSemanticsDic(uniform: *, uniformName: *) source

Params:

NameTypeAttributeDescription
uniform *
uniformName *

public clone(): * source

Return:

*

public getOneTexture(): * source

Return:

*

public getTexture(userFlavorName: *): * source

Params:

NameTypeAttributeDescription
userFlavorName *

Return:

*

public getTextureContributionRate(textureUserFlavorName: *): * source

Params:

NameTypeAttributeDescription
textureUserFlavorName *

Return:

*

public getTextureFromPurpose(purpose: *): * source

Params:

NameTypeAttributeDescription
purpose *

Return:

*

public getTextureNum(): * source

Return:

*

public getTextureNumAttachedShader(): * source

Return:

*

public getTexturePurpose(userFlavorNameOfTexture: *): * source

Params:

NameTypeAttributeDescription
userFlavorNameOfTexture *

Return:

*

public getTextureUserFlavorNames(): * source

Return:

*

public getUniform(glslProgram: *, uniformLocationName: *): * source

Params:

NameTypeAttributeDescription
glslProgram *
uniformLocationName *

Return:

*

public getUpdateStateString(): * source

Return:

*

public getVertexN(geom: *): * source

Params:

NameTypeAttributeDescription
geom *

Return:

*

public hasAnyTextures(): * source

Return:

*

public isTransparent(): * source

Return:

*

public readyForDiscard() source

Override:

GLBoostObject#readyForDiscard

public registerTextureUnitToUniform(texturePurpose: *, shaderProgram: *, uniformName: *) source

Params:

NameTypeAttributeDescription
texturePurpose *
shaderProgram *
uniformName *

public removeSemanticsDic(uniform: *) source

Params:

NameTypeAttributeDescription
uniform *

public removeTexture(userFlavorName: *, discardTexture: *) source

Params:

NameTypeAttributeDescription
userFlavorName *
discardTexture *
  • optional
  • default: true

public setAllTextureContributionRate(rateVec4: *) source

Params:

NameTypeAttributeDescription
rateVec4 *

public setShaderClassWithForceUpdate(shaderClass: *) source

Params:

NameTypeAttributeDescription
shaderClass *

public setTexture(texture: *, purpose: *) source

Params:

NameTypeAttributeDescription
texture *
purpose *

public setTextureContributionRate(textureUserFlavorName: *, rateVec4: *) source

Params:

NameTypeAttributeDescription
textureUserFlavorName *
rateVec4 *

public setTexturePurpose(userFlavorNameOfTexture: *, purpose: *) source

Params:

NameTypeAttributeDescription
userFlavorNameOfTexture *
purpose *

public setUniform(glslProgram: *, uniformLocationName: *, uniformLocation: *) source

Params:

NameTypeAttributeDescription
glslProgram *
uniformLocationName *
uniformLocation *

public setUpStates(mesh: *) source

Params:

NameTypeAttributeDescription
mesh *

public setUpTexture(textureName: *, textureUnitIndex: *): * source

bind the texture. For any value, it returns true if we call WebGL's bindTexture function, false otherwise.

Params:

NameTypeAttributeDescription
textureName *
textureUnitIndex *

Return:

*

public setVertexN(geom: *, num: *) source

Params:

NameTypeAttributeDescription
geom *
num *

public tearDownStates() source

public tearDownTexture(textureName: *, textureUnitIndex: *) source

Params:

NameTypeAttributeDescription
textureName *
textureUnitIndex *

public updateTextureInfo(texturePurpose: *, uniformName: *) source

Params:

NameTypeAttributeDescription
texturePurpose *
uniformName *

Private Methods

private _setUpMaterialStates(states: *) source

Params:

NameTypeAttributeDescription
states *

private _updateCount() source