My application is exhibiting some difficult to diagnose bugs which show
up only when rendering using vertex buffer objects using glColorPointer
on machines with nVidia video.
Since this is both new code, and the first time I've used VBOs, there
are many possibilities where I may have misunderstood something and
introduced the problem. At the moment I'm developing on machines
with Radeon chips which do not exhibit the bug, making it more
difficult to diagnose. One possibility I am unsure of from reading
the VBO spec, is whether the problem could be caused by using one
VBO for the vertex and normal data, and another VBO for the color
array data.
Is that something which I should only expect to work on ATI chips?
int stride = sizeof(Vertex) * (fInterleaved ? 2 : 1);
int normalsOffset = sizeof(Vertex) * (fInterleaved ? 1 : fNumVertices);
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, fIndexBufferObjectID);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, fVertexBufferObjectID);
glVertexPointer(3, GL_FLOAT, stride, (char*)NULL + 0);
if (fUseNormals) {
glEnableClientState(GL_NORMAL_ARRAY);
glNormalPointer(GL_FLOAT, stride, (char*)NULL + normalsOffset);
}
if (fColorBufferObjectID) {
glBindBufferARB(GL_ARRAY_BUFFER_ARB, fColorBufferObjectID);
glColorPointer(3, GL_FLOAT, sizeof(ColorArrayElement), NULL);
}
Is anyone here aware of differences in implementation or support
with respect to vertex buffer objects between ATI and nVidia that
might help me narrow down diagnosing the problem?