Howbizarre
04-29-2005, 12:09 AM
I am using VBOs to render a huge model. I create a VBO for both my Vertex Pointer and the Color Pointer using a structure of sort
struct sVertex
{
Vector3 m_vVertexCoordinates;
char m_bColor[3];
};
During creation of VBO I pass in the Vertex Data as.
glBufferDataARB(GL_ARRAY_BUFFER_ARB, iVertexListSize * sizeof(sVertex),vVertexList , GL_STATIC_DRAW_ARB);
where vVertexList is the pointer to my sVertex. While rendering the scene I make following calls.
a) For Vertex Pointer
glVertexPointer(3,GL_FLOAT,sizeof(sVertex),NULL);
b) For Color Pointer
glColorPointer(3,GL_UNSIGNED_BYTE,sizeof(sVertex), (void *)(NULL+3*sizeof(float)));
Now if I have my ClientState for Color Pointer turned on I get 6 FPS, while if I turn it off I get above 100 FPS. Please can someone tell me as to what am I doing wrong with the Color Pointer.
struct sVertex
{
Vector3 m_vVertexCoordinates;
char m_bColor[3];
};
During creation of VBO I pass in the Vertex Data as.
glBufferDataARB(GL_ARRAY_BUFFER_ARB, iVertexListSize * sizeof(sVertex),vVertexList , GL_STATIC_DRAW_ARB);
where vVertexList is the pointer to my sVertex. While rendering the scene I make following calls.
a) For Vertex Pointer
glVertexPointer(3,GL_FLOAT,sizeof(sVertex),NULL);
b) For Color Pointer
glColorPointer(3,GL_UNSIGNED_BYTE,sizeof(sVertex), (void *)(NULL+3*sizeof(float)));
Now if I have my ClientState for Color Pointer turned on I get 6 FPS, while if I turn it off I get above 100 FPS. Please can someone tell me as to what am I doing wrong with the Color Pointer.