Batch3D update
This commit is contained in:
+11
-2
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <glm/glm.hpp>
|
||||
#include "UVRegion.h"
|
||||
|
||||
class Mesh;
|
||||
class Texture;
|
||||
@@ -21,18 +22,26 @@ class Batch3D {
|
||||
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);
|
||||
|
||||
public:
|
||||
Batch3D(size_t capacity);
|
||||
~Batch3D();
|
||||
|
||||
void begin();
|
||||
void texture(Texture* texture);
|
||||
void sprite(glm::vec3 pos, glm::vec3 up, glm::vec3 right, float w, float h,
|
||||
int atlasRes, int index, glm::vec4 tint);
|
||||
void sprite(glm::vec3 pos, glm::vec3 up, glm::vec3 right, float w, float h);
|
||||
void blockCube(const glm::vec3& size, const UVRegion(&texfaces)[6], ubyte group);
|
||||
void render();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user