add blockSprite

This commit is contained in:
lllzebralll
2022-08-11 20:22:20 +03:00
parent 420ae4e993
commit 0711cb07f0
5 changed files with 82 additions and 5 deletions
+6 -1
View File
@@ -18,11 +18,15 @@ class Batch2D {
size_t index;
Texture* blank;
Texture* _texture;
Texture* _texture;
void vertex(float x, float y,
float u, float v,
float r, float g, float b, float a);
void vertex(vec2 point,
vec2 uvpoint,
float r, float g, float b, float a);
public:
Batch2D(size_t capacity);
~Batch2D();
@@ -30,6 +34,7 @@ public:
void begin();
void texture(Texture* texture);
void sprite(float x, float y, float w, float h, int atlasRes, int index, vec4 tint);
void blockSprite(float x, float y, float w, float h, int atlasRes, int index[6], vec4 tint);
void rect(float x, float y, float w, float h);
void rect(float x, float y, float w, float h,
float u, float v, float tx, float ty,