diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2018-10-27 12:41:58 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2018-10-27 12:47:05 +0100 |
commit | d3f47e042aebd5fbf86477abf7058704657e8430 (patch) | |
tree | 4996f0c46f7ebf5037ee7fecceb161bbeb4e549e /mtl.c | |
parent | adbc72e159d48e6b1ad091e6ac19fd1cd6d5f798 (diff) | |
download | faqe-d3f47e042aebd5fbf86477abf7058704657e8430.tar.gz faqe-d3f47e042aebd5fbf86477abf7058704657e8430.tar.xz faqe-d3f47e042aebd5fbf86477abf7058704657e8430.zip |
Cleanup pass
Diffstat (limited to 'mtl.c')
-rw-r--r-- | mtl.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -22,6 +22,7 @@ static struct mtl *mtls; static int lmtls; static size_t nmtls; +// tex_file: Load texture asset from file GLuint tex_file(const char *name, const char *type) { char loc[100]; @@ -38,6 +39,7 @@ GLuint tex_file(const char *name, const char *type) return ret; } +// mtl_load: Load a set of textures as a material int mtl_load(char *name) { struct mtl *m; @@ -57,6 +59,7 @@ int mtl_load(char *name) return lmtls++; } +// mtl_use: Set OpenGL state to use a certain material index void mtl_use(int mtl) { assert(mtl < lmtls); @@ -66,8 +69,8 @@ void mtl_use(int mtl) if (mtl < 0) return; -#define SH_TEX(type, name) \ - gl_tex_active(texture++); \ +#define SH_TEX(type, name) \ + gl_tex_active(texture++); \ gl_tex_bind(GL_TEXTURE_##type, mtls[mtl].name); #include "shaders/data.h" } |