Up: SGI performer Frequently Asked Questions (FAQ)
Next: -16- What is the difference between phases FREE, FLOAT, and LOCK?
Previous: -14- How do I make GL calls from within a IRIS Performer program?
Subject: -15- How do I overlay graphics on top of my Performer scene?
Date: 06 Oct 1993 00:00:01 EST
Typically this is done to implement a heads-up display (HUD).
In the draw function callback, the basic algorithm is:
save state with pfPushState()
disable textures, fog, & lighting with pfBasicState()
save & clear projection matrix
ortho2()
save & clear modelling matrix
draw()
restore modelling matrix
restore projection matrix
restore state with pfPopState()
Or, you can draw your static info in the overlay planes and only
redraw it when the window receives a REDRAW event (moved, resized,
etc.). Changing between drawing to the overlays and drawing to
regular bitplanes takes a big hit.
For things that need to be updated real-time, draw() would consist
of:
zfunction(ZF_ALWAYS);
zwritemask(0x0);
draw HUD stuff
zfunction(ZF_LEQUAL);
zwritemask(0xffffffff);
Up: SGI performer Frequently Asked Questions (FAQ)
Next: -16- What is the difference between phases FREE, FLOAT, and LOCK?
Previous: -14- How do I make GL calls from within a IRIS Performer program?