#include <CCRenderer.h>
Public Member Functions | |
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) |
ssize_t | getDrawnVertices () const |
void | addDrawnVertices (ssize_t number) |
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 |
ssize_t | _drawnBatches |
ssize_t | _drawnVertices |
Renderer | ( | ) |
~Renderer | ( | ) |
void addCommand | ( | RenderCommand * | 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.
|
inline |
|
inline |
|
protected |
int createRenderQueue | ( | ) |
Creates a render queue and returns its Id.
|
protected |
|
protected |
|
inline |
|
inline |
void initGLView | ( | ) |
|
protected |
void popGroup | ( | ) |
Pops a group from the render queue.
void pushGroup | ( | int | renderQueueID) |
Pushes a group into the render queue.
void render | ( | ) |
Renders into the GLView all the queued RenderCommand
objects.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |