Jim Helman (jimh++at++surreal)
Fri, 03 Nov 95 11:44:57 -0800
If you ever want to MP, you should keep the graphics calls in
draw callbacks.
The issue of optimal performance on single processor machines is
somewhat complex because the graphics subsystem is usually idle during
the APP stage (and the CULL stage when sorting is enabled or when
using APPCULLDRAW|CULL_DL_DRAW). One important tuning question is
whether your database renders more quickly with sorting turned on. If
sorting is off with APPCULLDRAW, a single CULLDRAW traversal is done,
rendering as it goes. Sorting during the CULL delays the start of
drawing, but often results in shorter drawing times.
Another issue you raise is when should you make GL calls? Because
holding off rendering for APP and maybe CULL can be bad (with even the
screen clear held off), in some cases it might be useful to run with
APPCULL_DRAW even on a single CPU machine and give the DRAW a higher
nondegrading priority so that you don't thrash with CPU context
switches between the two threads (although you might want to
add a lock around pfDraw() to guarantee this).
A significant optimization might be made simply by moving clear to the
beginning of the frame, e.g. rather than calling pfClear() in your
draw callback before pfDraw(), try clearing after swapbuffers in your
pfPipeSwapFunc().
rgds,
-jim helman
jimh++at++surreal.asd.sgi.com
415/390-1151
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:00 PDT