WebGLSpriteBatch Class
Constructor
WebGLSpriteBatch
()
private
Item Index
Methods
- _CompileShader static
- begin
- CompileFragmentShader static
- compileProgram static
- CompileVertexShader static
- destroy
- end
- flush
- initDefaultShaders static
- render
- renderBatch
- renderTilingSprite
- setContext
- start
- stop
Methods
_CompileShader
(
Any
private
static
-
gl
-
shaderSrc
-
shaderType
Parameters:
-
gl
WebGLContextthe current WebGL drawing context
-
shaderSrc
Array -
shaderType
Number
Returns:
Any:
begin
(
-
renderSession
Parameters:
-
renderSession
ObjectThe RenderSession object
CompileFragmentShader
(
Any
static
-
gl
-
shaderSrc
Parameters:
-
gl
WebGLContextthe current WebGL drawing context
-
shaderSrc
Array
Returns:
Any:
compileProgram
(
Any
static
-
gl
-
vertexSrc
-
fragmentSrc
Parameters:
-
gl
WebGLContextthe current WebGL drawing context
-
vertexSrc
Array -
fragmentSrc
Array
Returns:
Any:
CompileVertexShader
(
Any
static
-
gl
-
shaderSrc
Parameters:
-
gl
WebGLContextthe current WebGL drawing context
-
shaderSrc
Array
Returns:
Any:
destroy
()
Destroys the SpriteBatch.
end
()
flush
()
Renders the content and empties the current batch.
initDefaultShaders
()
private
static
renderTilingSprite
(
-
sprite
Renders a TilingSprite using the spriteBatch.
Parameters:
-
sprite
TilingSpritethe tilingSprite to render
setContext
(
-
gl
Parameters:
-
gl
WebGLContextthe current WebGL drawing context
start
()
stop
()
Properties
blendModes
Array
currentBatchSize
Number
dirty
Boolean
drawing
Boolean
indices
Uint16Array
Holds the indices
lastIndexCount
Number
shaders
Array
size
Number
The number of images in the SpriteBatch before it flushes
sprites
Array
textures
Array
vertices
Float32Array
Holds the vertices