12 #include "../data/vertex.h"
14 #include <glad/glad.h>
15 #include <glm/glm.hpp>
30 RenderBatch(GLint offset_i, GLsizei num_vertices_i, GLuint texture_i)
46 Glyph(GLuint texture_i,
float depth_i,
const Vertex &top_left_i,
48 const Vertex &bottom_left_i)
66 std::vector<details::Glyph> glyphs_;
67 std::vector<details::Glyph *> glyph_ptrs_;
68 std::vector<details::RenderBatch> render_batches_;
84 void draw(
const glm::vec4 &destination_rect,
const glm::vec4 &uv_rect,
85 GLuint texture,
const Colour &colour,
float depth);
90 void createRenderBatches();
void draw(const glm::vec4 &destination_rect, const glm::vec4 &uv_rect, GLuint texture, const Colour &colour, float depth)
Definition: spritebatch.cpp:76
GLuint texture
Definition: spritebatch.h:28
void end()
Definition: spritebatch.cpp:70
Glyph(GLuint texture_i, float depth_i, const Vertex &top_left_i, const Vertex &top_right_i, const Vertex &bottom_right_i, const Vertex &bottom_left_i)
Definition: spritebatch.h:46
Definition: spritebatch.h:58
GLuint texture
Definition: spritebatch.h:39
void begin()
Definition: spritebatch.cpp:63
Vertex bottom_left
Definition: spritebatch.h:44
void render()
Definition: spritebatch.cpp:106
Vertex bottom_right
Definition: spritebatch.h:43
SpriteBatch & operator=(const SpriteBatch &)=delete
Vertex top_left
Definition: spritebatch.h:41
RenderBatch(GLint offset_i, GLsizei num_vertices_i, GLuint texture_i)
Definition: spritebatch.h:30
GLint offset
Definition: spritebatch.h:26
static const int NUM_VERTICES
Definition: spritebatch.h:61
Definition: spritebatch.h:25
SpriteBatch()
Definition: spritebatch.cpp:23
float depth
Definition: spritebatch.h:40
Vertex top_right
Definition: spritebatch.h:42
Glyph with information of the texture.
Definition: spritebatch.h:38
GLsizei num_vertices
Definition: spritebatch.h:27
~SpriteBatch()
Definition: spritebatch.cpp:53