WebGLState

Methods

.enable (id : integer, boolean : boolean) : null

TODO

.disable (id : integer, boolean : boolean) : null

TODO

.setDepthTest (depthTest : boolean) : null

depthTest -- The boolean to decide if depth of a fragment needs to be tested against the depth buffer .

This sets, based on depthTest, whether or not the depth data needs to be tested against the depth buffer.

.setDepthWrite (depthWrite : boolean) : null

depthWrite -- The boolean to decide if depth of a fragment needs to be kept.

This sets, based on depthWrite, whether or not the depth data needs to be written in the depth buffer.

.setBlending (blending : number, blendEquation : number, blendSrc : number, blendDst : number) : null

blending -- A number indicating the blending mode. Possible value are v3d.NoBlending, v3d.NormalBlending, v3d.AdditiveBlending, v3d.SubtractiveBlending, v3d.MultiplyBlending or v3d.CustomBlending
blendEquation -- When blending is v3d.CustomBlending, then you can set the blendEquation. Possible values are v3d.AddEquation, v3d.SubtractEquation or v3d.ReverseSubtractEquation.
blendSrc -- When blending is v3d.CustomBlending, then you can set the blendSrc. Possible values are v3d.ZeroFactor, v3d.OneFactor,v3d.SrcColorFactor, v3d.OneMinusSrcColorFactor, v3d.SrcAlphaFactor, v3d.OneMinusSrcAlphaFactor, v3d.DstAlphaFactor, v3d.OneMinusDstAlphaFactor, v3d.DstColorFactor,v3d.OneMinusDstColorFactor or v3d.SrcAlphaSaturateFactor
blendDst -- When blending is v3d.CustomBlending, then you can set the blendDst. Possible values are v3d.ZeroFactor, v3d.OneFactor,v3d.SrcColorFactor, v3d.OneMinusSrcColorFactor, v3d.SrcAlphaFactor, v3d.OneMinusSrcAlphaFactor, v3d.DstAlphaFactor, v3d.OneMinusDstAlphaFactor, v3d.DstColorFactor,v3d.OneMinusDstColorFactor or v3d.SrcAlphaSaturateFactor

This method sets the correct blending.

Source

For more info on how to obtain the source code of this module see this page.