Prashant Saxena wrote:
> While doing couple of experiments with 'List' system I have got couple
> of doubts:
>
> glNewList(...,GL_COMPILE)
> glNewList....
> print 'just for the test'
> glEndList()
>
> When I initialize the list, the print statement executes. Later
> calling this list doesn't print the 'print' statement. I did this to
> test whether I can include some
> condition based drawing between 'glNewList' & 'glEndList'. These
> condition are based on some global variables. It seems 'List'
> instruction behaves like
> hard coded. Am I right here?
Display lists work by copying all of the *GL* commands you execute,
including the data they execute across to the card's internal memory (or
the GL's internal memory if your card doesn't have enough RAM). As a
result they cannot access your local (main memory) data. The display
list does not include any *Python* calls at all, only the GL-level calls.
As a note: display lists tend to be very slow on modern hardware
(compared to array-based geometry). They'll be faster than doing
per-vertex rendering in Python, but you will likely want to use
array-based operations rather than display lists if you want reasonable
performance.
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
|