12#include <unordered_map>
15#define UNIFORM_VIEWxPROJ_STR "uVP"
16#define UNIFORM_TEXTURE_ARRAY_STR "uTex"
28 int currentTexSlot = 0;
32 std::string shader =
"";
36 std::unordered_map<GameObject*, int> objs;
37 std::vector<float> vertices;
38 std::unordered_map<Texture*, int> textures;
68 static const uint32 strideSize;
69 static const uint32 strideSizeByte;
70 static uint32* indices;
71 static int indicesSize;
72 static uint32 batchMaxQuads;
73 static uint16 maxBatchTextures;
75 static std::unordered_map<int, std::vector<Batch*>> batchMap;
Defines the GameObject class and its related components.
The Batch class represents a batch of game objects to be rendered together.
Definition Batch.h:22
void Draw()
Draws the batch.
Definition Batch.cpp:143
void BindTextures()
Binds the textures associated with the batch.
Definition Batch.cpp:54
static int DefaultBatchDrawCallback(void *data)
Default batch draw callback function.
Definition Batch.cpp:187
static void ComputeIndices()
Computes the indices for the batch.
Definition Batch.cpp:71
bool Render(GameObject *go, float *stride)
Renders a game object using the batch.
Definition Batch.cpp:87
Batch()
Default constructor for the Batch class.
Definition Batch.cpp:27
void Delete()
Deletes the batch.
Definition Batch.cpp:178
Class representing a game object.
Definition GameObject.h:68