jubilant-funicular
|
#include <InstanceBatch.h>
Public Member Functions | |
void | begin () |
Clears out data from the previous frame. | |
void | end () const |
Doesn't actually do anything. This is purely cosmetic. | |
void | reset () |
If you don't want to follow the begin/end pattern, you can just call reset instead before adding glyphs. | |
void | add_glyph (crvec4 posRect, GLuint texture=0, crvec4 uvRect=glm::vec4(0, 0, 1, 1), crvec4 color=glm::vec4(1)) |
void | add_instance_data (const VertexAttrib *attribs, std::size_t num_attribs, void *data, GLsizeiptr size, GLuint divisor=1) |
void | render () const |
Private Attributes | |
std::vector< InstancedGlyph > | m_glyphs |
Definition at line 26 of file InstanceBatch.h.
void nta::InstanceBatch::add_glyph | ( | crvec4 | posRect, |
GLuint | texture = 0 , |
||
crvec4 | uvRect = glm::vec4(0,0,1,1) , |
||
crvec4 | color = glm::vec4(1) |
||
) |
Definition at line 13 of file InstanceBatch.cpp.
void nta::InstanceBatch::add_instance_data | ( | const VertexAttrib * | attribs, |
std::size_t | num_attribs, | ||
void * | data, | ||
GLsizeiptr | size, | ||
GLuint | divisor = 1 |
||
) |
Adds data that varies between instances (data associated to most recently added glyph).
attribs describes the glsl "in" variables to change
OpenGL fetches new data after divisor instances are rendered
Definition at line 33 of file InstanceBatch.cpp.