Jump to content
  • Advertisement
Sign in to follow this  

Dumping an STD::Vector into a VBO

This topic is 3370 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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...
		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
1. Why is the array called Indexes?
2. Why does the Indexes array contain floats?
3. What is the relationship between mIndexToRawDraw and Indexes?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!