Sign in to follow this  
ahlywog

Drawing order.

Recommended Posts

For opaque objects. The draw order is importatant for cutting down on the amount of overdraw. This is important if you have expensive shaders. You want to draw the objects near the front first, so that they have a chance to occlude the stuff behind. For transparent objects, the order is oposite. To get proper blending, you have to draw transparent objects from back to front, after all the opaque things.

Share this post


Link to post
Share on other sites
No, opengl draws things in the order you give it, it doesn't sort it for you.

For opaque objects it isn't critical to do this, but it can hurt your performance if you're drawing hundreds of things behind other objects.

For transparency if you want physically correct transparency you need to manually draw things back to front.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this