doofus
04-01-2004, 10:47 AM
I'm trying to display a cube built out of triangles. All the information is stored in an array of structures and then drawn:
glVertexPointer(3, GL_FLOAT, sizeof(Vertex), &vertices[0].position);
glNormalPointer(GL_FLOAT, sizeof(Vertex), &vertices[0].normal);
glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), &vertices[0].texCoord);
glDrawElements(GL_QUADS, 4, GL_UNSIGNED_INT, indices);
the problem I'm having though is that when depth buffering is enabled everything flickers as the objects rotated etc.
Dont suppose anyone knows what could possibly be going wrong??
Cheers.
glVertexPointer(3, GL_FLOAT, sizeof(Vertex), &vertices[0].position);
glNormalPointer(GL_FLOAT, sizeof(Vertex), &vertices[0].normal);
glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), &vertices[0].texCoord);
glDrawElements(GL_QUADS, 4, GL_UNSIGNED_INT, indices);
the problem I'm having though is that when depth buffering is enabled everything flickers as the objects rotated etc.
Dont suppose anyone knows what could possibly be going wrong??
Cheers.