refactor: Batch2D and Batch3D

This commit is contained in:
MihailRis
2024-06-06 11:24:16 +03:00
parent 18a3dcaabf
commit 7db76a0e6a
4 changed files with 57 additions and 42 deletions
+20 -13
View File
@@ -12,28 +12,35 @@ class Mesh;
class Texture;
class Batch3D {
float* buffer;
std::unique_ptr<float[]> buffer;
size_t capacity;
std::unique_ptr<Mesh> mesh;
std::unique_ptr<Texture> blank;
size_t index;
Texture* _texture;
Texture* currentTexture;
void vertex(float x, float y, float z,
float u, float v,
float r, float g, float b, float a);
void vertex(glm::vec3 coord,
float u, float v,
float r, float g, float b, float a);
void vertex(glm::vec3 point, glm::vec2 uvpoint,
float r, float g, float b, float a);
void face(const glm::vec3& coord, float w, float h,
void vertex(
float x, float y, float z,
float u, float v,
float r, float g, float b, float a
);
void vertex(
glm::vec3 coord,
float u, float v,
float r, float g, float b, float a
);
void vertex(
glm::vec3 point, glm::vec2 uvpoint,
float r, float g, float b, float a
);
void face(
const glm::vec3& coord, float w, float h,
const glm::vec3& axisX,
const glm::vec3& axisY,
const UVRegion& region,
const glm::vec4& tint);
const glm::vec4& tint
);
public:
Batch3D(size_t capacity);