Etienne Belanger(deleted)
|
|
Etienne Belanger(deleted)
05/07/2009 9:21 AM
post28891
|
glVertexPointer can return one of the following errors:
GL_INVALID_VALUE is generated if size is not 2, 3, or 4.
GL_INVALID_ENUM is generated if type is is not an accepted value.
GL_INVALID_VALUE is generated if stride is negative.
The only VBO related work that glVertexPointer is required to do is to copy the buffer object name in the
ARRAY_BUFFER_BINDING internal state to the VERTEX_ARRAY_BUFFER_BINDING internal state. This allows the following code to
work:
glBindBuffer(GL_ARRAY_BUFFER, vbo);
[...]
glVertexPointer(3, GL_FLOAT, 0, 0);
[...]
glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW);
[...]
glDrawArrays(GL_TRIANGLES, 0, count);
GL_MAX_ELEMENTS_VERTICES and GL_MAX_ELEMENTS_INDICES are marked as exposed, but not queriable in the OpenGL ES 1.0 spec.
Neither are exposed in the OpenGL ES 1.1 spec. For these reasons, I would just refrain from writing code that uses
these constants.
|
|
|