gearlib/include/textures.h

28 lines
579 B
C
Raw Normal View History

2024-04-30 23:02:19 +12:00
#ifndef __TEXTURES_H__
#define __TEXTURES_H__
2024-05-03 11:18:50 +12:00
#include <gearlib.h>
2024-04-30 23:02:19 +12:00
#include <stdint.h>
2024-05-03 11:18:50 +12:00
void setup_textures();
2024-04-30 23:02:19 +12:00
uint32_t load_texture(const char* path);
2024-05-03 11:18:50 +12:00
void draw_texture(uint32_t id, vec3 pos, vec4 color);
void batch_draw_texture(RenderBatch* batch, uint32_t id, vec3 pos, vec4 color);
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;
2024-04-30 23:02:19 +12:00
#endif