jubilant-funicular
|
A collection of debug primitives (outlines of shapes) to be drawn. More...
#include <DebugBatch.h>
Public Member Functions | |
DebugBatch () | |
Constructor. Doesn't actually do anything; use init() to initialize instead. | |
void | init () |
initializes the batch (only needs to be called once) | |
void | begin () |
begins collecting shapes to be drawn | |
void | end () |
ends collecting shapes | |
void | addLine (crvec2 start, crvec2 end, crvec4 color=glm::vec4(1), int num_pieces=2) |
Adds a shape to the batch. | |
void | addLine (crvec2 start, crvec2 end, int num_pieces, crvec4 color=glm::vec4(1)) |
void | addRect (crvec4 posRect, crvec4 color=glm::vec4(1), float orientation=0) |
void | addRect (crvec4 posRect, float orientation, crvec4 color=glm::vec4(1)) |
void | addCircle (crvec2 center, float radius, crvec4 color=glm::vec4(1)) |
void | addPolygon (std::size_t numSides, crvec2 center, float sideLength, float orientation, crvec4 color=glm::vec4(1)) |
void | render () const |
renders the batch | |
Private Attributes | |
std::vector< Vertex2D > | m_vertices |
std::vector< GLuint > | m_indices |
GLuint | m_vao = 0 |
GLuint | m_vbo = 0 |
GLuint | m_ibo = 0 |
A collection of debug primitives (outlines of shapes) to be drawn.
Definition at line 12 of file DebugBatch.h.