aboutsummaryrefslogtreecommitdiffstats
path: root/faqe.c
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2018-05-02 21:22:03 +0100
committerTomasz Kramkowski <tk@the-tk.com>2018-05-02 21:22:03 +0100
commitb659c412263f6dd7df962f7d42f4f51b7c3d5609 (patch)
treee2495e0b1446527b909a9c9fa2776797c7c28221 /faqe.c
parentec93a8eddf70adef2b1439a511d990021ad25d99 (diff)
downloadfaqe-b659c412263f6dd7df962f7d42f4f51b7c3d5609.tar.gz
faqe-b659c412263f6dd7df962f7d42f4f51b7c3d5609.tar.xz
faqe-b659c412263f6dd7df962f7d42f4f51b7c3d5609.zip
Implement diffuse texture loading and basic material support
Diffstat (limited to 'faqe.c')
-rw-r--r--faqe.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/faqe.c b/faqe.c
index 9567d1f..c13b4dc 100644
--- a/faqe.c
+++ b/faqe.c
@@ -36,7 +36,7 @@ int main(int argc, char **argv)
SDL_GLContext *glc;
GLuint prog;
struct {
- GLint model, view, proj;
+ GLint model, view, proj, tex;
} uni;
mat4x4 view;
FILE *cube_file;
@@ -84,9 +84,12 @@ int main(int argc, char **argv)
{ "model", &uni.model },
{ "view", &uni.view },
{ "proj", &uni.proj },
+ { "tex", &uni.tex },
{ 0 },
});
+ gl_uni_set1i(uni.tex, 0);
+
gl_prog_use(prog);
viewport(uni.proj, WIDTH, HEIGHT);