9 #ifndef YAGE_SPRITE_BATCH_H 10 #define YAGE_SPRITE_BATCH_H 15 #include <glm/glm.hpp> 61 GLint
offset()
const {
return offset_; }
69 static const int NUM_VERTICES = 6;
92 void draw(
const glm::vec4 &destination_rect,
const glm::vec4 &uv_rect,
98 void createVertexArray();
99 void createRenderBatches();
Definition: spritebatch.h:49
bool init()
Initializes YAGE.
Definition: yage.h:47
std::vector< Glyph * > glyph_ptrs_
Definition: spritebatch.h:75
GLuint texture_
Definition: spritebatch.h:56
Vertex bottom_left_
Definition: spritebatch.h:34
Vertex top_right() const
Definition: spritebatch.h:44
GLuint texture() const
Definition: spritebatch.h:41
float depth() const
Definition: spritebatch.h:42
Definition: spritebatch.h:66
Vertex top_left_
Definition: spritebatch.h:31
GLuint texture() const
Definition: spritebatch.h:63
Glyph(GLuint texture, float depth, const Vertex &top_left, const Vertex &top_right, const Vertex &bottom_right, const Vertex &bottom_left)
Definition: spritebatch.cpp:19
float depth_
Definition: spritebatch.h:30
friend SpriteBatch
Definition: spritebatch.h:51
GLuint texture_
Definition: spritebatch.h:29
Vertex bottom_left() const
Definition: spritebatch.h:46
Vertex bottom_right() const
Definition: spritebatch.h:45
Vertex bottom_right_
Definition: spritebatch.h:33
std::vector< RenderBatch > render_batches_
Definition: spritebatch.h:76
std::vector< Glyph > glyphs_
Definition: spritebatch.h:74
GLint offset_
Definition: spritebatch.h:55
Vertex top_right_
Definition: spritebatch.h:32
GLsizei num_vertices() const
Definition: spritebatch.h:62
GLint offset() const
Definition: spritebatch.h:61
Glyph with information of the texture.
Definition: spritebatch.h:26
Vertex top_left() const
Definition: spritebatch.h:43
Project namespace.
Definition: body.cpp:13
GLsizei num_vertices_
Definition: spritebatch.h:54