19 Clear (
true, 64 * 3, 1);
22 void GLIM_BATCH::Clear (
const bool reserveBuffers,
const unsigned int vertexCount,
const unsigned int attributeCount)
25 m_Data.
Reset (reserveBuffers, vertexCount, attributeCount);
44 Clear (reserveBuffers, vertexCount, attributeCount);
68 m_PrimitiveType = eType;
69 m_uiPrimitiveVertex = 0;
70 m_uiPrimitiveFirstIndex = (
unsigned int) m_Data.m_PositionData.size () / 3;
72 switch (m_PrimitiveType)
90 GLIM_CHECK (
false,
"GLIM_BATCH::Begin: The given primitive-type is currently not supported.");
94 GLIM_CHECK (
false,
"GLIM_BATCH::Begin: The given primitive-type is unknown.");
121 GLIM_CHECK (
m_uiPrimitiveVertex >= 4,
"GLIM_BATCH::End: You did not finish constructing the triangle fan. At least 4 vertices are required.");
188 GLIM_CHECK (
false,
"GLIM_BATCH::End: The given primitive-type is unknown.");
370 GLIM_CHECK (
false,
"GLIM_BATCH::Vertex: The given primitive-type is unknown.");
void Vertex(float x, float y, float z=0.0f)
Specifies a new vertex of a primitive.
void BeginBatch(bool reserveBuffers=true, unsigned int vertexCount=64 *3, unsigned int attributeCount=1)
glimBatchData & EndBatch(void) noexcept
Ends defining the batch. After this call "RenderBatch" can be called to actually render it.
unsigned int m_uiPrimitiveFirstIndex
void Begin(GLIM_ENUM eType) noexcept
Begins gathering information about the given type of primitives.
void End(void)
Ends gathering information about the primitives.
unsigned int m_uiPrimitiveLastIndex
GLIM_ENUM m_PrimitiveType
unsigned int m_uiPrimitiveVertex
bool PrepareRender()
Renders n instances of the batch that has been defined previously.
void Clear(bool reserveBuffers, unsigned int vertexCount, unsigned int attributeCount)
Deletes all data associated with this object.
void GLIM_CHECK(bool bCondition, const char *szErrorMsg) noexcept
Assert Macro used internally.
GLIM_ENUM
The enum holding all important GLIM configuration values.
@ GLIM_LINES
Can be passed to GLIM::Begin.
@ GLIM_LINE_STRIP
Can be passed to GLIM::Begin.
@ GLIM_QUADS
Can be passed to GLIM::Begin.
@ GLIM_POLYGON
Can be passed to GLIM::Begin.
@ GLIM_TRIANGLE_STRIP
Can be passed to GLIM::Begin (not yet implemented)
@ GLIM_POINTS
Can be passed to GLIM::Begin.
@ GLIM_LINE_LOOP
Can be passed to GLIM::Begin.
@ GLIM_TRIANGLE_FAN
Can be passed to GLIM::Begin.
@ GLIM_TRIANGLES
Can be passed to GLIM::Begin.
@ GLIM_QUAD_STRIP
Can be passed to GLIM::Begin (not yet implemented)
Divide::vector< unsigned int > m_IndexBuffer_Triangles
void Reset(bool reserveBuffers=false, unsigned int vertexCount=64 *3, unsigned int attributeCount=1)
unsigned int AddVertex(float x, float y, float z)
Divide::vector< unsigned int > m_IndexBuffer_Lines
Divide::vector< unsigned int > m_IndexBuffer_Wireframe
Divide::vector< unsigned int > m_IndexBuffer_Points