Jan Barglowski (jan++at++euryale.chinalake.navy.mil)
Wed, 2 Apr 1997 13:16:26 -0800 (PST)
I have done this with another channel being drawn transparently over my
main channel, rather than an image. But the technique should also
work for any OGL call, since I'm using OGL to make it go transparent
to begin with. Here's my code:
--- // Set the transparency. Clear the depth so we don't use underlaying channel // depth settings. glClearDepth(1.0); glClear(GL_DEPTH_BUFFER_BIT); glSampleMaskSGIS(0.8, 0); glEnable (GL_SAMPLE_MASK_SGIS);// Clear and draw the channel manually. chan->clear(); pfDraw();
// Undo the transparency. glDisable(GL_SAMPLE_MASK_SGIS);
---NOTE: I'm using an iR, so this trick with the sampling may only work on an iR! I may be able to find another technique given to me by the Performer list a few months ago for non-iR (or was it GL-based) machines, if needed.
Just knock out the channel drawing code and insert your glDrawPixels code...
-- Jan Anthony Barglowski jan++at++chinalake.navy.mil Real-time Computer Graphics http://www1.ridgecrest.ca.us/~jan Naval Air Warfare Center, China Lake (619) 927-1057 ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:00 PDT