cocos2d-x  3.0-beta2
 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 ()
void initGLView ()
void addCommand (RenderCommand *command)
void addCommand (RenderCommand *command, int renderQueue)
void pushGroup (int renderQueueID)
void popGroup ()
int createRenderQueue ()
void render ()

Static Public Attributes

static const int VBO_SIZE = 65536 / 6
static const int 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)

Protected Attributes

std::stack< int > _commandGroupStack
std::stack< RenderStackElement_renderStack
std::vector< RenderQueue_renderGroups
uint32_t _lastMaterialID
std::vector< QuadCommand * > _batchedQuadCommands
V3F_C4B_T2F_Quad _quads [VBO_SIZE]
GLushort _indices [6 *VBO_SIZE]
GLuint _quadVAO
GLuint _buffersVBO [2]
int _numQuads
bool _glViewAssigned

Constructor & Destructor Documentation

Renderer ( )
~Renderer ( )

Member Function Documentation

void addCommand ( RenderCommand command)
void addCommand ( RenderCommand command,
int  renderQueue 
)
void convertToWorldCoordinates ( V3F_C4B_T2F_Quad quads,
ssize_t  quantity,
const kmMat4 &  modelView 
)
protected
int createRenderQueue ( )
void drawBatchedQuads ( )
protected
void flush ( )
protected
void initGLView ( )
void mapBuffers ( )
protected
void popGroup ( )
void pushGroup ( int  renderQueueID)
void render ( )
void setupBuffer ( )
protected
void setupIndices ( )
protected
void setupVBO ( )
protected
void setupVBOAndVAO ( )
protected

Member Data Documentation

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

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