9 #ifndef YAGE_SPRITE_BATCH_HPP 10 #define YAGE_SPRITE_BATCH_HPP 15 #include <glm/glm.hpp> 57 GLint
offset()
const {
return offset_; }
64 static const int NUM_VERTICES = 6;
87 void draw(
const glm::vec4& destination_rect,
const glm::vec4& uv_rect,
93 void createVertexArray();
94 void createRenderBatches();
Definition: spritebatch.hpp:47
bool init()
Definition: yage.hpp:30
GLuint texture_
Definition: spritebatch.hpp:52
Vertex bottom_left_
Definition: spritebatch.hpp:32
Vertex top_right() const
Definition: spritebatch.hpp:42
GLuint texture() const
Definition: spritebatch.hpp:39
Definition: vertex.hpp:46
std::vector< Glyph * > glyph_ptrs_
Definition: spritebatch.hpp:70
float depth() const
Definition: spritebatch.hpp:40
Definition: spritebatch.hpp:62
Vertex top_left_
Definition: spritebatch.hpp:29
GLuint texture() const
Definition: spritebatch.hpp:59
Glyph(GLuint texture, float depth, const Vertex &top_left, const Vertex &top_right, const Vertex &bottom_right, const Vertex &bottom_left)
Definition: spritebatch.cpp:18
float depth_
Definition: spritebatch.hpp:28
friend SpriteBatch
Definition: spritebatch.hpp:48
GLuint texture_
Definition: spritebatch.hpp:27
Vertex bottom_left() const
Definition: spritebatch.hpp:44
Vertex bottom_right() const
Definition: spritebatch.hpp:43
Vertex bottom_right_
Definition: spritebatch.hpp:31
std::vector< RenderBatch > render_batches_
Definition: spritebatch.hpp:71
std::vector< Glyph > glyphs_
Definition: spritebatch.hpp:69
GLint offset_
Definition: spritebatch.hpp:51
Vertex top_right_
Definition: spritebatch.hpp:30
GLsizei num_vertices() const
Definition: spritebatch.hpp:58
GLint offset() const
Definition: spritebatch.hpp:57
Glyph with information of the texture.
Definition: spritebatch.hpp:25
Vertex top_left() const
Definition: spritebatch.hpp:41
Templated matrix class.
Definition: camera2d.hpp:17
GLsizei num_vertices_
Definition: spritebatch.hpp:50
Definition: vertex.hpp:25