diff options
| author | Thomas Guillermo Albers Raviola <thomas@thomaslabs.org> | 2026-01-16 23:02:32 +0100 |
|---|---|---|
| committer | Thomas Guillermo Albers Raviola <thomas@thomaslabs.org> | 2026-01-16 23:02:32 +0100 |
| commit | 6b8af9cf83851c075c6c9514b1deaa931c2b19a4 (patch) | |
| tree | 428986b49c32e21d3f7a3c2dfa41858ae0153209 /09-september/tomcat/renderer/texture.h | |
Initial commit
Diffstat (limited to '09-september/tomcat/renderer/texture.h')
| -rw-r--r-- | 09-september/tomcat/renderer/texture.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/09-september/tomcat/renderer/texture.h b/09-september/tomcat/renderer/texture.h new file mode 100644 index 0000000..8288c72 --- /dev/null +++ b/09-september/tomcat/renderer/texture.h @@ -0,0 +1,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 |
