Kiwi.Renderers.TextureAtlasRenderer Class
The Renderer object for rendering Texture Atlases
Constructor
Kiwi.Renderers.TextureAtlasRenderer
-
gl -
shaderManager -
[params=null]
Parameters:
-
glWebGLRenderingContext -
shaderManagerKiwi.Shaders.ShaderManager -
[params=null]Object optional
Returns:
Item Index
Methods
Methods
_generateIndices
-
numQuads
Generates quad indices
Parameters:
-
numQuadsNumber
addToBatch
-
gl -
entity -
camera
Collates all xy and uv coordinates into a buffer ready for upload to video memory
Parameters:
-
glWebGLRenderingContext -
entityKiwi.Entity -
cameraCamera
clear
-
gl
Clears the vertex buffer.
Parameters:
-
glWebGLRenderingContext
concatBatch
-
vertexItems
Adds an array of precalculated xyuv values to the item array
Parameters:
-
vertexItemsArray
disable
-
gl
Disables the renderer
Parameters:
-
glWebGLRenderingContext
draw
-
gl
Makes a draw call, this is where things actually get rendered to the draw buffer (or a framebuffer).
Parameters:
-
glWebGLRenderingContext
enable
-
gl -
[params=null]
Enables the renderer ready for drawing
Parameters:
-
glWebGLRenderingContext -
[params=null]Object optional
setShaderPair
-
shaderPair
Sets shader pair by name
Parameters:
-
shaderPairString
updateStageResolution
-
gl -
res
Updates the stage resolution uniforms
Parameters:
-
glWebGLRenderingContext -
resFloat32Array
updateTextureSize
-
gl -
size
Updates the texture size uniforms
Parameters:
-
glWebGLRenderingContext -
sizeFloat32Array
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.
