Steve Baker (steve++at++mred.bgm.link.com)
Fri, 1 Aug 97 06:50:46 -0500
> ... some kind of color filter lens. I tried to use OpenGL and draw a
> transparent color polygon in the draw call-back but the result was that
> only polygon was shown.
That should have worked if you implemented it right - but it would be
very costly on pixel fill.
> Any example code that I can follow?
If you are *really* lucky and your filter is always a primary colour
(RED, GREEN, BLUE) or a combination of primaries (CYAN, MAGENTA, YELLOW)
then you can get a good effect for free using glColorMask - set it just
before pfDraw and restore it afterwards if you plan on doing any other
non-3D stuff like GUI, etc.
If your filter is not a primary colour then you can still do it for free
in a full-screen application by messing with the colour gamma tables to
attenuate some of the colours more strongly than the others.
For IRIX 6.2 and later, check out:
XSGIvcStoreGammaColors16
...and...
XSGIvcSetChannelGammaMap
...Once you have this set up, the per-frame cost is exactly zero.
Steve Baker 817-619-1361 (Vox-Lab)
Hughes Training Inc. 817-619-8776 (Vox-Office/Vox-Mail)
2200 Arlington Downs Road 817-619-4028 (Fax)
Arlington, Texas. TX 76005-6171 Steve++at++MrEd.bgm.link.com (eMail)
http://www.hti.com http://web2.airmail.net/sjbaker1 (personal)
** Beware of Geeks bearing GIF's. **
=======================================================================
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:42 PDT