home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi.graphics
- Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!pacbell.com!ames!elroy.jpl.nasa.gov!sdd.hp.com!sgiblab!sgigate!odin!batcave.csd.sgi.com!brettb
- From: brettb@batcave.csd.sgi.com (Brett Bainter)
- Subject: Re: Problems with blink() (Help!)
- Message-ID: <1993Jan28.030206.14026@odin.corp.sgi.com>
- Sender: news@odin.corp.sgi.com (Net News)
- Nntp-Posting-Host: batcave.csd.sgi.com
- Organization: Silicon Graphics, Inc.
- References: <C0GCo0.9C7@cmcl2.nyu.edu>
- Date: Thu, 28 Jan 1993 03:02:06 GMT
- Lines: 32
-
- In article <C0GCo0.9C7@cmcl2.nyu.edu>, dario@cns.nyu.edu (Dario Ringach, x3941) writes:
- |> I've been having problems making blink() work on a Crimson running IRIX
- |> Release 4.0.5 System V. The problem is that blinking works, but it
- |> blinks the color in the colormap with BLACK always, independently of
- |> the red, green, blue, entries in: blink(rate,index,red,green,blue).
- |>
- |> Does anyone know why? Thanks in advance for any help.
-
-
- this is due to a known bug with blink(). it is passing the rgb values
- directly to x. since x's rgb range is 0..65535 the normal gl rgb values
- of 0..255 really are close to black. the problem can be worked around
- by shifting your colors up 8 bits (which is what the fix will do internally).
-
- you can use the following macro to help:
-
- #define m_blink(rate,index,r,g,b) blink(rate, index, (r)<<8, (g)<<8, (b)<<8)
-
- some other things to look out for when using blink:
-
- 1. make sure you gflush your mapcolors. (the blinker.c example from 4Dgifts
- has a problem in that it does not do this).
-
- 2. there is a known bug where blinking will fail if a program exits and
- leaves blinking on. thus you should always do a blink(-1, 0, 0, 0)
- before exiting. another methodology is to turn blinking on when you
- get focus and turn it off when you lose focus.
-
- --
- Brett Bainter
- Silicon Graphics
- brettb@sgi.com
-