Don't update vertex arrays if bound program has no vertex shader. trunk
authorRyan C. Gordon <icculus@icculus.org>
Sun, 27 Apr 2008 05:10:17 -0400
branchtrunk
changeset 221 328ac819b965
parent 220 df5ea69833d5
child 222 ed4421aa7e00
Don't update vertex arrays if bound program has no vertex shader.
mojoshader_opengl.c
--- a/mojoshader_opengl.c	Sun Apr 27 05:04:38 2008 -0400
+++ b/mojoshader_opengl.c	Sun Apr 27 05:10:17 2008 -0400
@@ -489,7 +489,7 @@
                                      int normalized, unsigned int stride,
                                      const void *ptr)
 {
-    if (bound_program == NULL)
+    if ((bound_program == NULL) || (bound_program->vertex == NULL))
         return;
 
     // Since glVertexPointer() lacks the flexibility that we can get from