blob: 16ee9c0fb7fe7858beca5b6da422a00bc42ced5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef texture_h
#define texture_h
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
enum texture_type {
texture_r = 1,
texture_rgb = 3,
texture_rgba = 4
};
struct texture {
u32 id;
const char *name;
enum texture_type type;
i32 width;
i32 height;
u8 *data;
};
i32 load_texture(struct arena *arena, struct texture *texture,
const char *filename, i32 gamma);
#endif
|