diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-23 20:41:48 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-23 20:41:48 -0700 |
commit | a32ac16a6c65d4a51354255c8b98e1c95faf2fc6 (patch) | |
tree | e03922066ec1278fc19ab8efac0616d40f2e18ec /tests/cubegeom.c | |
parent | 41bc8a9c147354b079f842924f25f40e50a25b1b (diff) |
clean up cubegeom
Diffstat (limited to 'tests/cubegeom.c')
-rw-r--r-- | tests/cubegeom.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/cubegeom.c b/tests/cubegeom.c index b82a08af..1fb5eeef 100644 --- a/tests/cubegeom.c +++ b/tests/cubegeom.c @@ -13,11 +13,15 @@ REDISTRIBUTION OF THIS SOFTWARE. */ #if !EMSCRIPTEN +#define USE_GLEW 1 +#endif + +#if USE_GLEW #include "GL/glew.h" #endif #include "SDL/SDL.h" -#if EMSCRIPTEN +#if !USE_GLEW #include "SDL/SDL_opengl.h" #endif @@ -75,13 +79,14 @@ int main(int argc, char *argv[]) // BEGIN -#if !EMSCRIPTEN +#if USE_GLEW glewInit(); #endif glMatrixMode(GL_PROJECTION); glLoadIdentity(); - glFrustum(-0.6435469817188064, 0.6435469817188064 ,-0.48266022190470925, 0.48266022190470925 ,0.5400000214576721, 2048); + // original: glFrustum(-0.6435469817188064, 0.6435469817188064 ,-0.48266022190470925, 0.48266022190470925 ,0.5400000214576721, 2048); + glFrustum(-0.6435469817188064, 0.1435469817188064 ,-0.48266022190470925, 0.88266022190470925 ,0.5400000214576721, 2048); glMatrixMode(GL_MODELVIEW); GLfloat matrixData[] = { -1, 0, 0, 0, 0, 0,-1, 0, @@ -199,8 +204,8 @@ int main(int argc, char *argv[]) "void main(void)\n" "{\n" " gl_Position = ftransform();\n" - " gl_TexCoord[0].xy = gl_MultiTexCoord0.xy + texgenscroll.xy;\n" - " gl_TexCoord[1].xy = gl_MultiTexCoord1.xy * 3.051851e-05;\n" + " gl_TexCoord[0].xy = gl_MultiTexCoord0.xy/100 + texgenscroll.xy;\n" // added /100 here + " gl_TexCoord[1].xy = gl_MultiTexCoord1.xy/100 * 3.051851e-05;\n" "}\n"; const char *fragmentShader = "uniform vec4 colorparams;\n" "uniform sampler2D diffusemap, lightmap;\n" |