• Advertisement

Archived

This topic is now archived and is closed to further replies.

Time consuming OGL func calls...

This topic is 6037 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 know certain OpenGL functions are supposed to be very time consuming (for the computer, not the programmer), but I''m a little fuzzy on which ones exactly they are... I''ve heard that glPushAttrib() etc. are bad. What about glPush/PopMatrix()? I also have heard that "state changes" are time consuming. What does this include? Is enabling/disabling culling and alpha-blending and that sort of thing something to be avoided as much as possible? In a nutshell, I''m wanting to know which functions to avoid or use conservatively to get the best performance. Thanks in advance for your responses.

Share this post


Link to post
Share on other sites
Advertisement
This is the kind of information that you have to search at the hardware manufacturers like nvidia, ati.
I think that you are right about the state changes but pop/push matrices is OK.
If you want better performance should your application keep track of the states. Setting an already enabled state is expensive. After that should you try to sort so you can use the same state as long as possible.
Particulary changing the texture seems to kill the performance.

Share this post


Link to post
Share on other sites
there is no list that i know of. it would change from card to card and even colour depth to colour depth (think stencil with 16bit + 32bit colour)
but yes push/pop attrib are slow, also changing textures etc check the faq perhaps theres more info there

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
on 3dcard, main slow things are bitmap operations, ie glBitmap etc, since they use computer memory, state changes and retrieving data from card. on software are things different since everything is in main computer memory:-) for example, on 3dcard font outlines are faster then font bitmaps, on software vice versa.
look for performance faq on sgi opengl site.


regards
Jindrich Kolman

Share this post


Link to post
Share on other sites

  • Advertisement