Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Organizing the D3D render pipeline

This topic is 3715 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'm pretty new to D3D, but I have considerable background in OpenGL. Thus far I've got along pretty nicely with D3D, but I'm getting slightly more serious with data throughput now for which I'm trying to write a semi-intelligent renderer. Hence this thread: What's the fastest way of organizing geometry for rendering in D3D? I can see 3 methods, each with its own drawbacks: 1) static mode build VBOs and fill them with data at load time problem: not enough flixibility 2) semi-static mode build placeholder VBO's at load time (large enough to contain a decent amount of data), fill these with new data at runtime every time something needs to be drawn problem: Lock() and Unlock() called every time the VBO is updated 3) fully dynamic mode build and fill VBO's at runtime problem: high runtime resource consumption as the VBO needs to be allocated, Lock()'ed, filled and Unlock()'ed To me the most natural approach seems to be the semi-static one. However, I'm a bit confused as to what to look out for: should I minimize the number of Lock()/Unlock() calls or try to make sure I spend a as little time as possible rebuilding geometry to suit larger/longer Lock()/Unlock() calls (eg spooling triangles). A for instance: I'm generating terrain dynamically. I've allocated a VBO for 1024 vertices. Should I do spooling and data rearrangement to render as many triangles at a time as possible or wouldn't that give me any special advantage over rendering every triangle separately? What's the "middle way" here? Eg, which approach should be the fastest under normal circumstances (or, put more simply, slightly differently - how much pre-render spooling should I do?)? Cheers!

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!