Jump to content
  • Advertisement
Sign in to follow this  
hardtop

VBO + octree + shaders ?

This topic is 4417 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 all! I'm can't figure out how to sort this problem out. > I have to use an frustum-culled octree structure to render my geometry, BUT I have to use vertex arrays or VBO's (of course). How should I store data to make this possible and efficient? > I'm using several shaders to render my scene. I don't want to perform unneeded switches as it's killing performance. Right now I'm storing data according to the shader to use, and render all faces of one specific shader at the same time; and so on for all shaders. How could I combine my shaders with the octree and VBO? Thanks a lot for your help, it'll be greatly appreciated! HT

Share this post


Link to post
Share on other sites
Advertisement
I'm using several shaders to render my scene. I don't want to perform unneeded switches as it's killing performance. Right now I'm storing data according to the shader to use, and render all faces of one specific shader at the same time; and so on for all shaders. How could I combine my shaders with the octree and VBO?

thats the way to do it.
at the start of each frame go through the meshes marking what is within the viewfrustum.
and then loop through all the materials if any meshs with this material are visable set the material + then draw all the meshes

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!