istereo
diff src/istereo.c @ 3:2c5620f0670c
trying to make this piece of crap work
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 07 Sep 2011 05:33:19 +0300 |
parents | bb68fac22579 |
children | 14bbdfcb9030 |
line diff
1.1 --- a/src/istereo.c Wed Sep 07 02:48:35 2011 +0300 1.2 +++ b/src/istereo.c Wed Sep 07 05:33:19 2011 +0300 1.3 @@ -1,15 +1,20 @@ 1.4 #include <stdio.h> 1.5 #include <assert.h> 1.6 +#include <unistd.h> 1.7 #include "opengl.h" 1.8 #include "istereo.h" 1.9 #include "sanegl.h" 1.10 #include "sdr.h" 1.11 +#include "objcsucks.h" 1.12 1.13 unsigned int prog; 1.14 1.15 int init(void) 1.16 { 1.17 - if(!(prog = create_program_load("sdr/test.v.glsl", "sdr/test.p.glsl"))) { 1.18 + char *path = ocs_get_path(OCS_PATH_RESOURCES); 1.19 + chdir(path); 1.20 + 1.21 + if(!(prog = create_program_load("test.v.glsl", "test.p.glsl"))) { 1.22 fprintf(stderr, "failed to load shader program\n"); 1.23 return -1; 1.24 } 1.25 @@ -32,8 +37,6 @@ 1.26 gl_load_identity(); 1.27 gl_translatef(0, 0, -8); 1.28 1.29 - gl_apply_xform(prog); 1.30 - 1.31 gl_begin(GL_QUADS); 1.32 gl_color3f(1, 0, 0); 1.33 gl_vertex3f(-1, -1, 0);