Thread View: comp.sys.sgi.graphics
2 messages
2 total messages
Started by Dario Ringach, x3941
Wed, 06 Jan 1993 21:50
Problems with blink() (Help!)
Author: Dario Ringach, x3941
Date: Wed, 06 Jan 1993 21:50
Date: Wed, 06 Jan 1993 21:50
11 lines
998 bytes
998 bytes
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. --- Dario Ringach office: (212) 998-3941 Center for Neural Science home: (212) 727-9346 New York University e-mail: dario@cns.nyu.edu
Re: Problems with blink() (Help!)
Author: Brett Bainter
Date: Thu, 28 Jan 1993 03:02
Date: Thu, 28 Jan 1993 03:02
32 lines
1926 bytes
1926 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads