blob: 8288c72045103b4271d51a5f84977dabdf09fa57 (
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
26
27
28
29
30
|
#ifndef TEXTURE_H
#define TEXTURE_H
#include "../shared.h"
typedef struct _Texture
{
GLuint tex_id;
GLenum type;
int number_of_rows; /* used for texture atlases */
char _name[MAX_PATH_LENGTH];
unsigned int hash_;
struct _Texture *_hash_next; /* linked list for storing on hash table */
} Texture;
extern Texture *texture_new(const char *name);
extern Texture *texture_with_name_new(const char *name, const char *path);
extern Texture *texture_cubemap_new(const char *paths[6]);
extern Texture *texture_cubemap_with_name_new(const char *name, const char *paths[6]);
extern Texture *texture_get(const char *name);
extern void texture_bind(Texture *tex, int slot);
extern void texture_purge(Texture *tex); /* Clean the texture without freeing the container */
#endif // TEXTURE_H
|