V-man
12-26-2003, 09:01 PM
GLuint ind[]={0, 1, 2, 3};
GLfloat vert[]={0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3};
glVertexPointer(3, GL_FLOAT, 0, vert);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawRangeElements(GL_POINTS, 0, 1, 4, GL_UNSIGNED_INT, ind);
glDisableClientState(GL_VERTEX_ARRAY);
-----------------
Shouldn't the above code cause glGetError to return an error.
Notice that start = 0 and end = 1
The spec just says that end should not be smaller than start.
GLfloat vert[]={0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3};
glVertexPointer(3, GL_FLOAT, 0, vert);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawRangeElements(GL_POINTS, 0, 1, 4, GL_UNSIGNED_INT, ind);
glDisableClientState(GL_VERTEX_ARRAY);
-----------------
Shouldn't the above code cause glGetError to return an error.
Notice that start = 0 and end = 1
The spec just says that end should not be smaller than start.