]> git.cworth.org Git - apitrace-tests/blobdiff - apps/gl/varray.c
Avoid zero strides.
[apitrace-tests] / apps / gl / varray.c
index 8ec8914879452f38186085f4332243f88526518b..719e8f2adce9130a1ed47e5472672a45024fd435 100644 (file)
@@ -89,8 +89,8 @@ static void setupPointers(void)
    glEnableClientState(GL_VERTEX_ARRAY);
    glEnableClientState(GL_COLOR_ARRAY);
 
-   glVertexPointer(2, GL_INT, 0, vertices);
-   glColorPointer(3, GL_FLOAT, 0, colors);
+   glVertexPointer(2, GL_INT, 2 * sizeof(GLint), vertices);
+   glColorPointer(3, GL_FLOAT, 3 * sizeof(GLfloat), colors);
 }
 
 static void setupInterleave(void)
@@ -144,7 +144,7 @@ static void reshape(int w, int h)
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
-   gluOrtho2D(0.0, (GLdouble) w, 0.0, (GLdouble) h);
+   glOrtho(0.0, (GLdouble) w, 0.0, (GLdouble) h, -1.0, 1.0);
 }
 
 int main(int argc, char** argv)