Steve Baker (sbaker++at++link.com)
Wed, 3 Dec 1997 09:34:46 -0600 (CST)
> I have asked this question before but didn't get what we want...
> Our application has 8 channels, one of them will have a
> yellow(red, green and black) color filtering len.
>
> (1) Someone suggested using glColorMask which will turn off
> R,G,B color bit(s), this result doesn't mimic the filtering effect.
If the real world device is yellow, then it is blocking out blue light.
Turning off the Blue colour planes should be exactly the right thing.
The only drawback is that this only allows you to mimic a *perfect*
filter that absorbs all of the blue light and none of the green or red.
> (2) I tried to draw transparent polygon in front of the view but
> then some other channels will see this polygon as well, since
> four of the channels have the same view position.
Well, you can fix that problem by drawing the polygon yourself in the
DRAW process callback right after you call pfDraw().
I think you'd have to be very careful about how you set up the OpenGL
blendfunc to get the effect that you want. Of course this will also
result in a pretty big increase in the number of pixels you have to fill.
> (3) I also tried "glPixelTransfer*" and did some color scale effect
> in channel drawing callback. This one seems ok, but the color
> of sky didn't change, which is OK because I can change ESky.
> However, all other channels were affected.
>
> So my question is: is there any way I can do "glPixelTransfer*"
> to one channel without discoloring other channels? Or there is
> other better way to do this task?
Sure - just put the code in the draw callback - but only execute
it in the filtered channel.
You might also want to consider using the gamma tables - depending
on what channel setup you have and what hardware you are running on.
On Inf.Reality, you can play with XSGIvcSetChannelGammaMap and
XSGIvcStoreGammaColors16 to set up the gamma on a per-pipe basis.
Steve Baker 817-619-8776 (Vox/Vox-Mail)
Hughes Training Inc. 817-619-4028 (Fax)
2200 Arlington Downs Road SBaker++at++link.com (eMail)
Arlington, Texas. TX 76005-6171 SJBaker1++at++airmail.net (Personal 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:56:20 PDT