Kiwi.Renderers.TextureAtlasRenderer Class
The Renderer object for rendering Texture Atlases
Constructor
Kiwi.Renderers.TextureAtlasRenderer
-
gl
-
shaderManager
-
[params=null]
Parameters:
-
gl
WebGLRenderingContext -
shaderManager
Kiwi.Shaders.ShaderManager -
[params=null]
Object optional
Returns:
Item Index
Methods
Methods
_generateIndices
-
numQuads
Generates quad indices
Parameters:
-
numQuads
Number
addToBatch
-
gl
-
entity
-
camera
Collates all xy and uv coordinates into a buffer ready for upload to video memory
Parameters:
-
gl
WebGLRenderingContext -
entity
Kiwi.Entity -
camera
Camera
clear
-
gl
Clears the vertex buffer.
Parameters:
-
gl
WebGLRenderingContext
concatBatch
-
vertexItems
Adds an array of precalculated xyuv values to the item array
Parameters:
-
vertexItems
Array
disable
-
gl
Disables the renderer
Parameters:
-
gl
WebGLRenderingContext
draw
-
gl
Makes a draw call, this is where things actually get rendered to the draw buffer (or a framebuffer).
Parameters:
-
gl
WebGLRenderingContext
enable
-
gl
-
[params=null]
Enables the renderer ready for drawing
Parameters:
-
gl
WebGLRenderingContext -
[params=null]
Object optional
setShaderPair
-
shaderPair
Sets shader pair by name
Parameters:
-
shaderPair
String
updateStageResolution
-
gl
-
res
Updates the stage resolution uniforms
Parameters:
-
gl
WebGLRenderingContext -
res
Float32Array
updateTextureSize
-
gl
-
size
Updates the texture size uniforms
Parameters:
-
gl
WebGLRenderingContext -
size
Float32Array
Properties
_maxItems
Number
private
The maximum number of items that can be rendered by the renderer (not enforced)
_shaderPairName
String
private
The reference to the shaderPair.
camMatrix
Float32Array
public
The camera matrix
isBatchRenderer
Boolean
public
Returns whether this is a batch renderer.
loaded
Array
public
RENDERER_ID
Array
public
static
The identifier for this renderer.
shaderManager
Array
public
Reference to the shaderManager - used for requesting shaders.
shaderPair
Kiwi.Shaders.TextureAtlasShade
public
The shaderPair that this renderer uses.