diff options
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" } |