Jump to content
  • Advertisement
Sign in to follow this  
MARS_999

OpenGL Do you have to delete IBO?

This topic is 4359 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

I was wondering if with DX you have to delete the IBO and VBO if you want to reuse them? If so how do you? I know with OpenGL you have to delete the object if you want to reuse it again later... Thanks

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure I understand your question [oh]

calling Release() on a VB or IB (I presume IBO and VBO are the OpenGL names for Vertex buffers and index buffers?) will effectively delete the object. Or, rather, inform COM and the API that you no longer have an interest in using them. The device should keep an internal reference to any bound objects so you might also want to call SetIndices( NULL ) to remove that one as well.

If you mean reusing as in wiping out the data and starting again with new stuff, then you can just use a Lock operation. If you want to change the contained format you either need an FVF-less buffer or you need to destroy and recreate.

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
I'm not sure I understand your question [oh]

calling Release() on a VB or IB (I presume IBO and VBO are the OpenGL names for Vertex buffers and index buffers?) will effectively delete the object. Or, rather, inform COM and the API that you no longer have an interest in using them. The device should keep an internal reference to any bound objects so you might also want to call SetIndices( NULL ) to remove that one as well.

If you mean reusing as in wiping out the data and starting again with new stuff, then you can just use a Lock operation. If you want to change the contained format you either need an FVF-less buffer or you need to destroy and recreate.

hth
Jack


Hey Jolly, yeah I am referring to the latter. So if you have a VB with a set format and you want to add another vertex attribute you will have to delete that object and recreate it again, but if I want to use the same format but just add or subtract from it I can use the same VB over and over again... Thanks

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!