cocos2d-x  3.0-rc0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Renderer Class Reference

#include <CCRenderer.h>

Public Member Functions

 Renderer ()
 Renderer ()
 ~Renderer ()
void initGLView ()
void addCommand (RenderCommand *command)
 Adds a RenderComamnd into the renderer. More...
 
void addCommand (RenderCommand *command, int renderQueue)
 Adds a RenderComamnd into the renderer specifying a particular render queue ID. More...
 
void pushGroup (int renderQueueID)
 Pushes a group into the render queue. More...
 
void popGroup ()
 Pops a group from the render queue. More...
 
int createRenderQueue ()
 Creates a render queue and returns its Id. More...
 
void render ()
 Renders into the GLView all the queued RenderCommand objects. More...
 
ssize_t getDrawnBatches () const
void addDrawnBatches (ssize_t number)
local addDrawnBatches ( local number)
ssize_t getDrawnVertices () const
void addDrawnVertices (ssize_t number)

Static Public Attributes

static const int VBO_SIZE = 65536 / 6
var VBO_SIZE = 65536 / 6
local VBO_SIZE = 65536 / 6
static const int BATCH_QUADCOMMAND_RESEVER_SIZE = 64
var BATCH_QUADCOMMAND_RESEVER_SIZE = 64
local BATCH_QUADCOMMAND_RESEVER_SIZE = 64

Protected Member Functions

void setupIndices ()
void setupBuffer ()
void setupVBOAndVAO ()
void setupVBO ()
void mapBuffers ()
void drawBatchedQuads ()
void flush ()
void convertToWorldCoordinates (V3F_C4B_T2F_Quad *quads, ssize_t quantity, const kmMat4 &modelView)
var convertToWorldCoordinates ( var quads, var quantity, var modelView)
local convertToWorldCoordinates ( local quads, local quantity, local modelView)

Protected Attributes

std::stack< int > _commandGroupStack
var _commandGroupStack
local _commandGroupStack
std::stack< RenderStackElement_renderStack
var _renderStack
local _renderStack
std::vector< RenderQueue_renderGroups
var _renderGroups
local _renderGroups
uint64_t _lastMaterialID
var _lastMaterialID
local _lastMaterialID
std::vector< QuadCommand * > _batchedQuadCommands
var _batchedQuadCommands
local _batchedQuadCommands
V3F_C4B_T2F_Quad _quads [VBO_SIZE]
GLushort _indices [6 *VBO_SIZE]
GLuint _quadVAO
GLuint _buffersVBO [2]
var _buffersVBO ()
local _buffersVBO ()
int _numQuads
bool _glViewAssigned
var _glViewAssigned
local _glViewAssigned
ssize_t _drawnBatches
var _drawnBatches
local _drawnBatches
ssize_t _drawnVertices
var _drawnVertices
local _drawnVertices

Constructor & Destructor Documentation

Renderer ( )
var Renderer ( )
local Renderer ( )
~Renderer ( )
var ~Renderer ( )
local ~Renderer ( )

Member Function Documentation

void addCommand ( RenderCommand command)

Adds a RenderComamnd into the renderer.

var addCommand ( var  command)

Adds a RenderComamnd into the renderer.

local addCommand ( local  command)

Adds a RenderComamnd into the renderer.

void addCommand ( RenderCommand command,
int  renderQueue 
)

Adds a RenderComamnd into the renderer specifying a particular render queue ID.

var addCommand ( var  command,
var  renderQueue 
)

Adds a RenderComamnd into the renderer specifying a particular render queue ID.

local addCommand ( local  command,
local  renderQueue 
)

Adds a RenderComamnd into the renderer specifying a particular render queue ID.

void addDrawnBatches ( ssize_t  number)
inline
var addDrawnBatches ( var  number)
inline
local addDrawnBatches ( local  number)
inline
void addDrawnVertices ( ssize_t  number)
inline
var addDrawnVertices ( var  number)
inline
local addDrawnVertices ( local  number)
inline
void convertToWorldCoordinates ( V3F_C4B_T2F_Quad quads,
ssize_t  quantity,
const kmMat4 &  modelView 
)
protected
var convertToWorldCoordinates ( var  quads,
var  quantity,
var  modelView 
)
protected
local convertToWorldCoordinates ( local  quads,
local  quantity,
local  modelView 
)
protected
int createRenderQueue ( )

Creates a render queue and returns its Id.

var createRenderQueue ( )

Creates a render queue and returns its Id.

local createRenderQueue ( )

Creates a render queue and returns its Id.

void drawBatchedQuads ( )
protected
var drawBatchedQuads ( )
protected
local drawBatchedQuads ( )
protected
void flush ( )
protected
var flush ( )
protected
local flush ( )
protected
ssize_t getDrawnBatches ( ) const
inline
var getDrawnBatches ( )
inline
local getDrawnBatches ( )
inline
ssize_t getDrawnVertices ( ) const
inline
var getDrawnVertices ( )
inline
local getDrawnVertices ( )
inline
void initGLView ( )
var initGLView ( )
local initGLView ( )
void mapBuffers ( )
protected
var mapBuffers ( )
protected
local mapBuffers ( )
protected
void popGroup ( )

Pops a group from the render queue.

var popGroup ( )

Pops a group from the render queue.

local popGroup ( )

Pops a group from the render queue.

void pushGroup ( int  renderQueueID)

Pushes a group into the render queue.

var pushGroup ( var  renderQueueID)

Pushes a group into the render queue.

local pushGroup ( local  renderQueueID)

Pushes a group into the render queue.

void render ( )

Renders into the GLView all the queued RenderCommand objects.

var render ( )

Renders into the GLView all the queued RenderCommand objects.

local render ( )

Renders into the GLView all the queued RenderCommand objects.

void setupBuffer ( )
protected
var setupBuffer ( )
protected
local setupBuffer ( )
protected
void setupIndices ( )
protected
var setupIndices ( )
protected
local setupIndices ( )
protected
void setupVBO ( )
protected
var setupVBO ( )
protected
local setupVBO ( )
protected
void setupVBOAndVAO ( )
protected
var setupVBOAndVAO ( )
protected
local setupVBOAndVAO ( )
protected

Member Data Documentation

std::vector<QuadCommand*>
_batchedQuadCommands
protected
var _batchedQuadCommands
protected
local _batchedQuadCommands
protected
GLuint _buffersVBO[2]
protected
GLuint _buffersVBO[2]
protected
GLuint _buffersVBO[2]
protected
std::stack<int> _commandGroupStack
protected
var _commandGroupStack
protected
local _commandGroupStack
protected
ssize_t _drawnBatches
protected
var _drawnBatches
protected
local _drawnBatches
protected
ssize_t _drawnVertices
protected
var _drawnVertices
protected
local _drawnVertices
protected
bool _glViewAssigned
protected
var _glViewAssigned
protected
local _glViewAssigned
protected
GLushort _indices[6 *VBO_SIZE]
protected
GLushort _indices[6 *VBO_SIZE]
protected
GLushort _indices[6 *VBO_SIZE]
protected
uint64_t _lastMaterialID
protected
var _lastMaterialID
protected
local _lastMaterialID
protected
int _numQuads
protected
var _numQuads
protected
local _numQuads
protected
V3F_C4B_T2F_Quad _quads[VBO_SIZE]
protected
V3F_C4B_T2F_Quad _quads[VBO_SIZE]
protected
V3F_C4B_T2F_Quad _quads[VBO_SIZE]
protected
GLuint _quadVAO
protected
var _quadVAO
protected
local _quadVAO
protected
std::vector<RenderQueue>
_renderGroups
protected
var _renderGroups
protected
local _renderGroups
protected
std::stack<RenderStackElement>
_renderStack
protected
var _renderStack
protected
local _renderStack
protected
const int
BATCH_QUADCOMMAND_RESEVER_SIZE = 64
static
var BATCH_QUADCOMMAND_RESEVER_SIZE = 64
static
local
BATCH_QUADCOMMAND_RESEVER_SIZE = 64
static
const int VBO_SIZE = 65536 / 6
static
var VBO_SIZE = 65536 / 6
static
local VBO_SIZE = 65536 / 6
static

The documentation for this class was generated from the following file: