32#include <boost/scoped_array.hpp>
37class VERTEX_CONTAINER;
39class CACHED_CONTAINER;
40class NONCACHED_CONTAINER;
108 VRANGE(
int aStart,
int aEnd,
bool aContinuous ) :
int m_totalHuge
Number of regular VRANGEs (small items) pooled into single draw call.
std::vector< VRANGE > m_vranges
Number of huge VRANGEs (i.e. large zones) with separate draw calls.
unsigned int m_indexBufMaxSize
Size of the current VRANGE.
unsigned int m_indicesCapacity
Ranges of visible vertex indices to render.
~GPU_CACHED_MANAGER()
Prepare the stored data to be drawn.
unsigned int m_curVrangeSize
virtual void DrawIndices(const VERTEX_ITEM *aItem) override
Clear the container after drawing routines.
virtual void BeginDrawing() override
Make the GPU draw given range of vertices.
bool m_buffersInitialized
Pointer to the current indices buffer.
int m_totalNormal
Current size of index buffer.
boost::scoped_array< GLuint > m_indices
Current indices buffer size.
unsigned int m_indexBufSize
Maximum size taken by the index buffer for all frames rendered so far.
void Map()
Unmap vertex buffer.
void resizeIndices(unsigned int aNewSize)
< Resizes the indices buffer to aNewSize if necessary
virtual void EndDrawing() override
Map vertex buffer stored in GPU memory.
Class to handle uploading vertices and indices to GPU in drawing purposes.
int m_shaderAttrib
true: enable Z test when drawing
virtual void SetShader(SHADER &aShader)
Allow using shaders with the stored data.
virtual void DrawIndices(const VERTEX_ITEM *aItem)=0
Make the GPU draw given range of vertices.
void EnableDepthTest(bool aEnabled)
Enable/disable Z buffer depth test.
VERTEX_CONTAINER * m_container
Shader handling.
virtual void BeginDrawing()=0
Prepare the stored data to be drawn.
bool m_isDrawing
Container that stores vertices data.
static GPU_MANAGER * MakeManager(VERTEX_CONTAINER *aContainer)
SHADER * m_shader
Location of shader attributes (for glVertexAttribPointer)
virtual void EndDrawing()=0
Clear the container after drawing routines.
virtual void BeginDrawing() override
Make the GPU draw given range of vertices.
virtual void EndDrawing() override
Clear the container after drawing routines.
virtual void DrawIndices(const VERTEX_ITEM *aItem) override
Clear the container after drawing routines.
Provide the access to the OpenGL shaders.
The Cairo implementation of the graphics abstraction layer.
VRANGE(int aStart, int aEnd, bool aContinuous)
Common defines and consts used in vertex related classes.