RenderState

RenderState sets the flags for the GPU associated with a rendering action (blending, masking, depth test, etc). It is stored in the material (although defined usually from Shader) so the material can use it.

Constructor

new L3D.RenderState()

Properties

blend bool = false
blendFunc Array = [GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA]
blendFunc0 number = GL.SRC_ALPHA
blendFunc1 number = GL.ONE_MINUS_SRC_ALPHA
colorMask Array = [true, true, true, true]
colorMask0 bool = true
colorMask1 bool = true
colorMask2 bool = true
colorMask3 bool = true
cullFace bool = true
cullFaceMode number = GL.BACK
depthFunc number = GL.LESS
depthMask bool = true
depthRange Array = [0,1]
depthTest bool = true
frontFace number = GL.CCW
skipBlend bool = false
skipDepth bool = false
skipStencil bool = false
stencilFunc Array = [GL.ALWAYS, 0, 0xff]
stencilFuncFunc number = GL.ALWAYS
stencilFuncMask number = 0xff
stencilFuncRef number = 0
stencilMask number = 0xff
stencilOp Array = [GL.KEEP, GL.KEEP, GL.KEEP]
stencilOpDFail number = GL.KEEP
stencilOpDPass number = GL.KEEP
stencilOpSFail number = GL.KEEP
stencilTest bool = false

Methods

static reset(gl)

Set the GLContext to the default RenderState

Parameters
gl GLContext

The GLContext to set.