Jump to content
  • Advertisement
Sign in to follow this  
dbzprogrammer

OpenGL VBO

This topic is 4619 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 just read the NeHe tutorial on VBO's. And now I'm quite happy with the speed difference! Especially with a 256 MB video card. My quesiton is, once you load the data to the video card, is there a way I can modify it? Say I load a basic character in, but need to animate him with skeletal animation. Would I just have to rotate it and then upload it into a VBO, or could I just modify the array on the VRAM? One last thing, when you bind and load textures to OpenGL, are they saved on the video card? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Depending on your target hardware you might be better off doing the skeletal animation in a vertex shader, saves the CPU work.

However, if thats not an option then, no, you cant modifiy the data in VRAM. You dont have direct access to it (nor can you get it). The fastest method is to maintain a copy of the model in system ram and modify it there and upload it to the VBO when you've animated it (glBufferSubData() being the function you need iirc).

For faster uploading you'll want to invalidate the old buffer first, this is done by calling glBufferData() (again, iirc) with a NULL or 0 as the data address field BEFORE you upload your new data. This basically tells the driver "I'm done with the current content of the buffer, just lose it when you are done with it" (works for both NV and ATI).

Share this post


Link to post
Share on other sites
Ok, so here's what I got from you. The fastest way would be to put the animation on the vertex shader. Then copy the whole sceen's verticies to the VBO and render it... Sounds good! =D

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!