From d3f47e042aebd5fbf86477abf7058704657e8430 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Sat, 27 Oct 2018 12:41:58 +0100 Subject: Cleanup pass --- mtl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mtl.c') diff --git a/mtl.c b/mtl.c index 22fc757..7e55af1 100644 --- a/mtl.c +++ b/mtl.c @@ -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" } -- cgit v1.2.3-54-g00ecf