Jump to content
  • Advertisement
Sign in to follow this  
Opwiz

Comments on my render-list

This topic is 4371 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'm in the process of implementing a render-list that I defined as a collection of renderables (that is to be rendered each frame) organized in a way that optimizes rendering (achieved by minimizing state-changes). A renderable is a chunk of vertices in a vertex buffer rendered with a certain effect technique & effect parameters. Currently I have a render-list that sorts renderables by effect, technique, vertex buffer and effect parameters (in that order). I want to support alpha blending so I also need to be able to sort renderables back to front. So I figured I'd add a variable "order" in each renderable and sort the renderables by: order, effect, technique, vertex buffer and effect parameters. Solid renderables have order = 0 and are rendered first, blended objects have order = -distance to camera. Is there anything missing in this design? Is the sorting order good, e.g. should I sort by vertex buffer before technique? Thanks Patrik

Share this post


Link to post
Share on other sites
Advertisement
Quote:
I want to support alpha blending so I also need to be able to sort renderables back to front

I guess that answers my post :) I thought as much, it must be the original code that's mixed up.

Anyway.. From what you posted, it sounds about right. The fastest sorting order could be found once it's implemented. The way i picture it, it should be easy to swap, for example, the technique and vertex buffer order during benchmark tests.

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!