mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
world-wide commit to ruin everything
This commit is contained in:
parent
fbce36a05c
commit
8a073e4e8a
57 changed files with 1433 additions and 958 deletions
|
|
@ -4,16 +4,18 @@
|
|||
#include <stdlib.h>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "UVRegion.h"
|
||||
|
||||
using namespace glm;
|
||||
|
||||
class Mesh;
|
||||
class Texture;
|
||||
class Sprite;
|
||||
|
||||
class Batch2D {
|
||||
float* buffer;
|
||||
size_t capacity;
|
||||
size_t offset;
|
||||
glm::vec4 color;
|
||||
Mesh* mesh;
|
||||
size_t index;
|
||||
|
||||
|
|
@ -28,13 +30,23 @@ class Batch2D {
|
|||
float r, float g, float b, float a);
|
||||
|
||||
public:
|
||||
glm::vec4 color;
|
||||
|
||||
Batch2D(size_t capacity);
|
||||
~Batch2D();
|
||||
|
||||
void begin();
|
||||
void texture(Texture* texture);
|
||||
void sprite(float x, float y, float w, float h, int atlasRes, int index, vec4 tint);
|
||||
void sprite(Sprite* sprite);
|
||||
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,
|
||||
float ox, float oy,
|
||||
float angle, UVRegion region,
|
||||
bool flippedX, bool flippedY,
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue