X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=progs%2Fdemos%2Fshapes%2Fshapes.c;h=69c0a1a94da8ee20a70dedfefc7adb3b9b7f1281;hb=b1ed93dd348f7b8f3bd2c75474f5d4151d502f1f;hp=d132777ae0220bb406b1ad87c7bd3fb96f7bca42;hpb=a91c4e11d70265093dc3a7c15ed3f1b07883e9df;p=freeglut
diff --git a/progs/demos/shapes/shapes.c b/progs/demos/shapes/shapes.c
index d132777..69c0a1a 100644
--- a/progs/demos/shapes/shapes.c
+++ b/progs/demos/shapes/shapes.c
@@ -5,10 +5,10 @@
in OpenGLUT. It may also be useful to see which
parameters control what behavior in the OpenGLUT
objects.
-
+
Spinning wireframe and solid-shaded shapes are
displayed. Some parameters can be adjusted.
-
+
Keys:
- Esc Quit
- q Q Quit
@@ -34,7 +34,7 @@
\author Portions Copyright (C) 2004, the OpenGLUT project contributors.
OpenGLUT branched from freeglut in February, 2004.
-
+
\image html openglut_shapes.png OpenGLUT Geometric Shapes Demonstration
\include demos/shapes/shapes.c
*/
@@ -63,7 +63,7 @@ void checkError(const char *functionName)
}
/*
- * OpenGL 2+ shader mode needs some function and macro definitions,
+ * OpenGL 2+ shader mode needs some function and macro definitions,
* avoiding a dependency on additional libraries like GLEW or the
* GL/glext.h header
*/
@@ -283,9 +283,10 @@ GLint getAttribOrUniformLocation(const char* name, GLuint program, GLboolean isA
GLint attrib = gl_GetAttribLocation(program, name);
if (attrib == -1)
{
- fprintf(stderr, "Warning: Could not bind attrib %s\n", name);
+ fprintf(stderr, "Warning: Could not bind attrib %s\n", name);
}
+ checkError ("getAttribOrUniformLocation");
return attrib;
}
else
@@ -293,16 +294,16 @@ GLint getAttribOrUniformLocation(const char* name, GLuint program, GLboolean isA
GLint uniform = gl_GetUniformLocation(program, name);
if (uniform == -1)
{
- fprintf(stderr, "Warning: Could not bind uniform %s\n", name);
+ fprintf(stderr, "Warning: Could not bind uniform %s\n", name);
}
+ checkError ("getAttribOrUniformLocation");
return uniform;
}
- checkError ("getAttribOrUniformLocation");
}
GLuint program;
-GLint attribute_fg_coord = -1, attribute_fg_normal = -1;
+GLint attribute_fg_coord = -1, attribute_fg_normal = -1;
GLint uniform_m = -1, uniform_p = -1, uniform_m_3x3_inv_transp = -1;
GLint shaderReady = 0; /* Set to 1 when all initialization went well, to -1 when shader somehow unusable. */
@@ -799,10 +800,10 @@ key(unsigned char key, int x, int y)
case '.':
case '>': stacks++; break;
- case '9':
+ case '9':
case '(': if( depth > -1 ) depth--; break;
- case '0':
+ case '0':
case ')': ++depth; break;
case 'P':