9 #ifndef YAGE_SPRITE_BATCH_HPP 10 #define YAGE_SPRITE_BATCH_HPP 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.hpp:49
bool init()
Definition: yage.hpp:31
std::vector< Glyph * > glyph_ptrs_
Definition: spritebatch.hpp:75
GLuint texture_
Definition: spritebatch.hpp:56
Vertex bottom_left_
Definition: spritebatch.hpp:34
Vertex top_right() const
Definition: spritebatch.hpp:44
GLuint texture() const
Definition: spritebatch.hpp:41
Definition: vertex.hpp:49
float depth() const
Definition: spritebatch.hpp:42
Definition: spritebatch.hpp:66
Vertex top_left_
Definition: spritebatch.hpp:31
GLuint texture() const
Definition: spritebatch.hpp: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.hpp:30
friend SpriteBatch
Definition: spritebatch.hpp:51
GLuint texture_
Definition: spritebatch.hpp:29
Vertex bottom_left() const
Definition: spritebatch.hpp:46
Vertex bottom_right() const
Definition: spritebatch.hpp:45
Vertex bottom_right_
Definition: spritebatch.hpp:33
std::vector< RenderBatch > render_batches_
Definition: spritebatch.hpp:76
std::vector< Glyph > glyphs_
Definition: spritebatch.hpp:74
GLint offset_
Definition: spritebatch.hpp:55
Vertex top_right_
Definition: spritebatch.hpp:32
GLsizei num_vertices() const
Definition: spritebatch.hpp:62
GLint offset() const
Definition: spritebatch.hpp:61
Glyph with information of the texture.
Definition: spritebatch.hpp:26
Vertex top_left() const
Definition: spritebatch.hpp:43
Templated matrix class.
Definition: camera2d.hpp:17
GLsizei num_vertices_
Definition: spritebatch.hpp:54
Definition: vertex.hpp:26