home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sgi / graphics / 224 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.8 KB  |  45 lines

  1. Newsgroups: comp.sys.sgi.graphics
  2. 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
  3. From: brettb@batcave.csd.sgi.com (Brett Bainter)
  4. Subject: Re: Problems with blink()  (Help!)
  5. Message-ID: <1993Jan28.030206.14026@odin.corp.sgi.com>
  6. Sender: news@odin.corp.sgi.com (Net News)
  7. Nntp-Posting-Host: batcave.csd.sgi.com
  8. Organization: Silicon Graphics, Inc.
  9. References:  <C0GCo0.9C7@cmcl2.nyu.edu>
  10. Date: Thu, 28 Jan 1993 03:02:06 GMT
  11. Lines: 32
  12.  
  13. In article <C0GCo0.9C7@cmcl2.nyu.edu>, dario@cns.nyu.edu (Dario Ringach, x3941) writes:
  14. |> I've been having problems making blink() work on a Crimson running IRIX
  15. |> Release 4.0.5 System V.  The problem is that blinking works, but it
  16. |> blinks the color in the colormap with BLACK always, independently of
  17. |> the red, green, blue, entries in:  blink(rate,index,red,green,blue).
  18. |> 
  19. |> Does anyone know why?  Thanks in advance for any help.
  20.  
  21.  
  22. this is due to a known bug with blink().  it is passing the rgb values
  23. directly to x.  since x's rgb range is 0..65535 the normal gl rgb values
  24. of 0..255 really are close to black.  the problem can be worked around
  25. by shifting your colors up 8 bits (which is what the fix will do internally).
  26.  
  27. you can use the following macro to help:
  28.  
  29. #define m_blink(rate,index,r,g,b)  blink(rate, index, (r)<<8, (g)<<8, (b)<<8)
  30.  
  31. some other things to look out for when using blink:
  32.  
  33. 1. make sure you gflush your mapcolors. (the blinker.c example from 4Dgifts
  34.    has a problem in that it does not do this).
  35.  
  36. 2. there is a known bug where blinking will fail if a program exits and
  37.    leaves blinking on.  thus you should always do a blink(-1, 0, 0, 0)
  38.    before exiting.  another methodology is to turn blinking on when you
  39.    get focus and turn it off when you lose focus.
  40.  
  41. -- 
  42. Brett Bainter
  43. Silicon Graphics
  44. brettb@sgi.com
  45.