Sign in to follow this  
Lednakashim

Dumping an STD::Vector into a VBO

Recommended Posts

Hello, I was wondering if this code makes sense...
std::vector<GLfloat> Indexes;

...Some code to populate the vectors...

glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(GLfloat)*(myModel->Indexes.size()), &myModel->Indexes[0], GL_STATIC_COPY_ARB);

...In the draw loop...
glEnableClientState(GL_VERTEX_ARRAY);
		glVertexPointer(3, GL_FLOAT, 0, 0);
		glDrawArrays(GL_QUADS, 0, myModel->mIndexToRawDraw.size()); 
I have noticed a strange issue, that when using simple shapes many of the vericies are missing. For example, a box made with a 3d modeler will have its back missing.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this