update DrawContext

This commit is contained in:
MihailRis
2024-07-21 16:06:40 +03:00
parent cf12338a32
commit 3590bd14cd
9 changed files with 67 additions and 45 deletions
+3 -2
View File
@@ -2,6 +2,7 @@
#define GRAPHICS_CORE_BATCH3D_HPP_
#include "../../typedefs.hpp"
#include "commons.hpp"
#include <memory>
#include <stdlib.h>
@@ -11,7 +12,7 @@ class Mesh;
class Texture;
struct UVRegion;
class Batch3D {
class Batch3D : public Flushable {
std::unique_ptr<float[]> buffer;
size_t capacity;
std::unique_ptr<Mesh> mesh;
@@ -54,7 +55,7 @@ public:
void blockCube(const glm::vec3 size, const UVRegion(&texfaces)[6], const glm::vec4 tint, bool shading=true);
void point(glm::vec3 pos, glm::vec2 uv, glm::vec4 tint);
void point(glm::vec3 pos, glm::vec4 tint);
void flush();
void flush() override;
void flushPoints();
};