12 #ifndef YAGE_SPRITE_BATCH_H 13 #define YAGE_SPRITE_BATCH_H 17 #include <glad/glad.h> 18 #include <glm/glm.hpp> 64 GLint
offset()
const {
return offset_; }
72 static const int NUM_VERTICES = 6;
95 void draw(
const glm::vec4 &destination_rect,
const glm::vec4 &uv_rect,
101 void createVertexArray();
102 void createRenderBatches();
Definition: spritebatch.h:52
std::vector< Glyph * > glyph_ptrs_
Definition: spritebatch.h:78
GLuint texture_
Definition: spritebatch.h:59
Vertex bottom_left_
Definition: spritebatch.h:37
Vertex top_right() const
Definition: spritebatch.h:47
GLuint texture() const
Definition: spritebatch.h:44
float depth() const
Definition: spritebatch.h:45
Definition: spritebatch.h:69
Vertex top_left_
Definition: spritebatch.h:34
void init()
Initializes yage.
Definition: yage.cpp:23
GLuint texture() const
Definition: spritebatch.h:66
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:33
friend SpriteBatch
Definition: spritebatch.h:54
GLuint texture_
Definition: spritebatch.h:32
Vertex bottom_left() const
Definition: spritebatch.h:49
Vertex bottom_right() const
Definition: spritebatch.h:48
Vertex bottom_right_
Definition: spritebatch.h:36
std::vector< RenderBatch > render_batches_
Definition: spritebatch.h:79
std::vector< Glyph > glyphs_
Definition: spritebatch.h:77
GLint offset_
Definition: spritebatch.h:58
Vertex top_right_
Definition: spritebatch.h:35
GLsizei num_vertices() const
Definition: spritebatch.h:65
GLint offset() const
Definition: spritebatch.h:64
Glyph with information of the texture.
Definition: spritebatch.h:29
Vertex top_left() const
Definition: spritebatch.h:46
Project namespace.
Definition: camera2d.cpp:13
GLsizei num_vertices_
Definition: spritebatch.h:57