new Tiny.WebGLState(gl)
Name | Type | Description |
---|---|---|
gl |
WebGLRenderingContext |
The current WebGL rendering context |
Members
-
activeStateUint8Array
-
The current active state
-
defaultStateUint8Array
-
The default state
-
glWebGLRenderingContext
-
The current WebGL rendering context
Methods
-
Pops a state out
-
Pushes a new active state
-
resetAttributes()
-
Disables all the vaos in use
-
resetToDefault()
-
Resets all the logic and disables the vaos
-
setBlend(value)
-
Enables or disabled blending.
Name Type Description value
boolean Turn on or off webgl blending.
-
setBlendMode(value)
-
Sets the blend mode.
Name Type Description value
number The blend mode to set to.
-
setCullFace(value)
-
Sets whether to enable or disable cull face.
Name Type Description value
boolean Turn on or off webgl cull face.
-
setDepthTest(value)
-
Sets whether to enable or disable depth test.
Name Type Description value
boolean Turn on or off webgl depth testing.
-
setFrontFace(value)
-
Sets the gl front face.
Name Type Description value
boolean true is clockwise and false is counter-clockwise
-
setState(state)
-
Sets the current state
Name Type Description state
* The state to set.