To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 3087
3086  |  3088
Subject: 
Re: Clipping / CCW / CW / INVERT
Newsgroups: 
lugnet.cad.dev
Date: 
Sat, 9 Oct 1999 13:00:07 GMT
Viewed: 
532 times
  
"Lars C. Hassing" wrote:

Leonardo Zide wrote:
If you keep changing states (turning backface culling on/off or
changing front faces from CW to CCW) very often, you'll get a *slower*
rendering in OpenGL (don't know about D3D).

Do you know the reason why?
The change-state-calls could cost a little overhead, but don't they just set some flags?
And these flags would just cause negating an orientation test?

  I once asked the same question :) Most OpenGL drivers have part of the
rendering code create at runtime instead of having if/else statements
for all the possible flags. When you change the state, the driver has to
rebuild the code again and that takes time, and I guess that it has to
finish processing all the triangles sent to it before but I'm not sure.
  Another problem is that you have to send the elements in a slower way
to be able to change the culling parameters. If you don't believe me
take a look at the optimization section of any OpenGL book, it will say
that the first thing you should avoid are state changes and the second
thing to do is use vertex arrays.

Leonardo



Message is in Reply To:
  Re: Clipping / CCW / CW / INVERT
 
(...) Do you know the reason why? The change-state-calls could cost a little overhead, but don't they just set some flags? And these flags would just cause negating an orientation test? /Lars (25 years ago, 9-Oct-99, to lugnet.cad.dev)

18 Messages in This Thread:






Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR