X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=progs%2Fdemos%2Fshapes%2Fshapes.c;h=8d69fc09f4005182071344a6fb7f3fa456c9256f;hb=dcdd8f2768e317dfd86561c0abe83c4a83968e52;hp=2fe6bb49374f364023dfcca5ddc9ddfb02c44ebe;hpb=e1b6896dfd1e929a3b22d2a3886e6b4d6354feeb;p=freeglut diff --git a/progs/demos/shapes/shapes.c b/progs/demos/shapes/shapes.c index 2fe6bb4..8d69fc0 100644 --- a/progs/demos/shapes/shapes.c +++ b/progs/demos/shapes/shapes.c @@ -44,6 +44,7 @@ #include #include #include +#include #include "glmatrix.h" @@ -285,6 +286,7 @@ GLint getAttribOrUniformLocation(const char* name, GLuint program, GLboolean isA fprintf(stderr, "Warning: Could not bind attrib %s\n", name); } + checkError ("getAttribOrUniformLocation"); return attrib; } else @@ -295,9 +297,9 @@ GLint getAttribOrUniformLocation(const char* name, GLuint program, GLboolean isA fprintf(stderr, "Warning: Could not bind uniform %s\n", name); } + checkError ("getAttribOrUniformLocation"); return uniform; } - checkError ("getAttribOrUniformLocation"); } GLuint program; @@ -852,10 +854,12 @@ static void special (int key, int x, int y) /* Cuboctahedron can't be shown when in shader mode, skip it */ if (useShader && NUMBEROF (table)-1 == ( unsigned )function_index) + { if (key==GLUT_KEY_PAGE_UP) function_index = 0; else function_index -= 1; + } }