mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
update DrawContext
This commit is contained in:
parent
cf12338a32
commit
3590bd14cd
9 changed files with 67 additions and 45 deletions
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue