View Full Version : switching rendering states
09-05-2003, 01:14 PM
I heard that switching rendering states is slow in OpenGl. In my program, I am drawing regular textures and volume textures, switching between the two for each model. Is this bad? Should I instead go through each model and draw all of the regular textures first and then go through all of the models again and draw the volume textures? Do you think this would help performance?
09-05-2003, 03:09 PM
IMHO, well, it's true... and false. I mean that if you change the OpenGL state without rendering something or clearing buffer, I think that you won't lose a lot of time [calls to functions], because in most drivers "real" state switch happens only when you send something to render (the driver tries to optimize your calls). and these switches are costly.
So if I were you, I would try to sort objects to render in order to minimize states changes between rendering objects.
Look at this link if you want to know more about increasing performances: http://www.opengl.org/developers/code/s2001/perfogl.pdf
[This message has been edited by Evan Meakyl (edited 09-05-2003).]
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.