]> git.lizzy.rs Git - dragonblocks_alpha.git/blob - src/client/texture.h
refactoring
[dragonblocks_alpha.git] / src / client / texture.h
1 #ifndef _TEXTURE_H_
2 #define _TEXTURE_H_
3
4 #include <GL/glew.h>
5 #include <GL/gl.h>
6
7 typedef struct {
8         GLuint txo;
9         int width, height, channels;
10 } Texture;
11
12 Texture *texture_load(char *path, bool mipmap);
13 Texture *texture_load_cubemap(char *path);
14 void texture_upload(Texture *texture, unsigned char *data, GLenum format, bool mipmap);
15 void texture_destroy(Texture *texture);
16
17 #endif // _TEXTURE_H_