#ifndef __TEXTURES_H__
#define __TEXTURES_H__

#include <gearlib.h>
#include <stdint.h>

typedef uint32_t Texture;

void setup_textures();
Texture load_texture(const char* path);
void draw_texture(Texture id, vec2 pos, vec2 size, vec4 tint);
void draw_texture_trans(Texture id, mat4 transform, vec4 tint);
void batch_draw_texture(RenderBatch* batch, Texture id, mat4 transform, vec4 tint);
RenderBatch* create_texture_quad_batch();

extern RenderBatch* texture_quad_batch;
extern int max_textures;

typedef struct {
    vec3 Position;
    vec4 Tint;
    vec2 TexCoord;
    float TexID;
} TextureQuadVertex;

typedef struct {
    float texture_index;
} TextureQuadBatchData;

#endif
