State changes for post-draw GL callbacks

New Message Reply Date view Thread view Subject view Author view

Kent Watsen (watsen++at++netcom.com)
Sat, 31 Dec 1994 08:00:46 -0800 (PST)


Hello,

My applications often require 2-D symbology to be overlayed
on top of a simulation channel. The 2-D symbology could be
a VAPS or a DWB object, but when its trivial in nature I
like to use home-brewed GL code. A typical GL overlay call
would assume an orthogonal view in a unit channel between
-1 and 1. Since Performer is a 3-D application, I must
performer the transformations myself. An example of this
follows: (please excude psuedocode as I have neither manual
not code with me :)

postdraw ()
{
pfPushState();
pfBasicState();
something to overwrite pizels in z-buffer
ortho2(-1.0, 1.0, -1.0, 1.0);

pushmatrix();
create a 4x4 identity matrix
loadmatrix();

update_overlay ( overlay_data );

popmatrix();
reset z-buffer
pfPopState();
}

This code works just fine, but I wonder if the state and
matrix changes are seriously affecting frame-rate in the
most time-critical section of the rendering loop. It
should be noted that this procedure if sometimes repeated
(up to four times) for each channel, with up to six
channels, 20 times a second.

Kent Watsen
DCS Corporation
Simulation Lab
703.683.8430 x369


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:46 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.