summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-08-01 20:03:29 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-08-01 20:03:29 +0000
commitcc738e004f083566f3e1723f72623ef9875f72ec (patch)
tree2d668f1a48c123da0cf5da5cf6f2a1773f9710ee /progs
parentf05e7eba9598f1afaeed600a016afda5d426e610 (diff)
casts and assertions
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/vao_demo.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/progs/demos/vao_demo.c b/progs/demos/vao_demo.c
index b037816221..ce416712fe 100644
--- a/progs/demos/vao_demo.c
+++ b/progs/demos/vao_demo.c
@@ -22,6 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*/
+#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -280,11 +281,15 @@ static void Init( void )
exit(1);
}
- bind_vertex_array = glutGetProcAddress( "glBindVertexArrayAPPLE" );
- gen_vertex_arrays = glutGetProcAddress( "glGenVertexArraysAPPLE" );
- delete_vertex_arrays = glutGetProcAddress( "glDeleteVertexArraysAPPLE" );
- is_vertex_array = glutGetProcAddress( "glIsVertexArrayAPPLE" );
+ bind_vertex_array = (PFNGLBINDVERTEXARRAYAPPLEPROC) glutGetProcAddress( "glBindVertexArrayAPPLE" );
+ gen_vertex_arrays = (PFNGLGENVERTEXARRAYSAPPLEPROC) glutGetProcAddress( "glGenVertexArraysAPPLE" );
+ delete_vertex_arrays = (PFNGLDELETEVERTEXARRAYSAPPLEPROC) glutGetProcAddress( "glDeleteVertexArraysAPPLE" );
+ is_vertex_array = (PFNGLISVERTEXARRAYAPPLEPROC) glutGetProcAddress( "glIsVertexArrayAPPLE" );
+ assert(bind_vertex_array);
+ assert(gen_vertex_arrays);
+ assert(delete_vertex_arrays);
+ assert(is_vertex_array);
glEnable( GL_DEPTH_TEST );