API Docs for: 0.5.5
Show:

kick.core.GLState Class

Module: kick.core

This object should only be used by advanced users.
The GLState object contains properties representing the current WebGL states. This object is useful when creating component with custom render methods. It is important that any state modified by such method needs to be reset (set to null).

Constructor

kick.core.GLState

(
  • engine
)

Parameters:

Methods

clear

()

Sets all properties to null

Properties

blendKey

Object

Represents if blend is enabled and the current s-factor and d-factor

boundShader

kick.material.Shader

Represents the current shader bound

colorBufferFloatExtension

Object final

Adds support for rendering to 32-bit floating-point color buffers. See http://www.khronos.org/registry/webgl/extensions/WEBGL_color_buffer_float/

colorBufferHalfFloatExtension

Object final

This extension exposes the EXT_color_buffer_half_float functionality to WebGL. See http://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_half_float/

currentClearColor

kick.math.Vec4

The current clear color

currentMaterial

kick.material.Material

Represent the material used

depthMaskCache

Boolean

Represents the current depthMask state.

depthTextureExtension

Object final

The WEBGL_depth_texture extension (if available) See http://www.khronos.org/registry/webgl/extensions/WEBGL\_depth\_texture/

elementIndexUIntExtension

Object final

WebGL 1.0 supports drawElements with value of UNSIGNED_BYTE and UNSIGNED_SHORT. This extension adds support for UNSIGNED_INT values. See http://www.khronos.org/registry/webgl/extensions/OES_element_index_uint/

faceCulling

Number

Represent the state of CULL_FACE (enabled / disabled) and cullFace (). Values must be one of: GL_FRONT, GL_FRONT_AND_BACK, GL_BACK or GL_NONE. (If none CULL_FACE is disabled otherwise enabled)

instancedArraysExtension

Object final

This extension exposes the ANGLE_instanced_arrays functionality to WebGL. See http://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/

meshBuffer

WebGLBuffer

Current bound mesh buffer

meshShader

kick.material.Shader

The shader bound by the current mesh

polygonOffsetEnabled

Boolean

Represents state of polygon offset fill

renderTarget

kick.texture.RenderTexture deprecated

Represents the current rendertarget state

standardDerivativesExtension

Object final

The OES_standard_derivatives extension (if available) See http://www.khronos.org/registry/webgl/extensions/OES\_standard\_derivatives/

textureFilterAnisotropicExtension

Object final

The EXT_texture_filter_anisotropic extension (if available) See http://www.khronos.org/registry/webgl/extensions/EXT\_texture\_filter\_anisotropic/

textureFilterAnisotropicExtension

Object final

The EXT_draw_buffers / WEBGL_draw_buffers extension (if available). Also known as multiple render targets. See http://www.khronos.org/registry/webgl/extensions/WEBGL_draw_buffers/

textureFloatExtension

Object final

The OES_texture_float extension (if available) See http://www.khronos.org/registry/webgl/extensions/OES\_texture\_float/

textureFloatHalfExtension

Object final

The OES_texture_half_float extension (if available) See http://www.khronos.org/registry/webgl/extensions/OES\_texture\_half\_float/

textureFloatLinearExtension

Object final

This extension exposes the OES_texture_half_float_linear functionality to WebGL. See http://www.khronos.org/registry/webgl/extensions/OES_texture_half_float_linear/

textureFloatLinearExtension

Object final

This extension exposes the OES_texture_float_linear functionality to WebGL. See http://www.khronos.org/registry/webgl/extensions/OES_texture_float_linear/

vertexArrayObjectExtension

Object final

The OES_vertex_array_object extension (if available) See http://www.khronos.org/registry/webgl/extensions/OES\_vertex\_array\_object/

viewportSize

kick.math.Vec2

The size of the current viewport

zTest

Number

Represents the current depthFunc used. Must be one of the following values: GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL, GL_GEQUAL or GL_ALWAYS.