Re: Cursor changes

New Message Reply Date view Thread view Subject view Author view

Wade Olsen (wade++at++fnord)
Mon, 13 Dec 1993 17:11:34 -0800


On Dec 9, 3:49pm, Kevin Russo wrote:
> Subject: Cursor changes
> I want my Performer1.1 app to be able to change the cursor shape
> in response to different modes in the simulation. As I understand
> it, since I'd have to use the GL cursor-routines (or X?) to do this,
> they can only be invoked in the draw proc.
>
> My question is what's the best way to handle changing the cursor
> shape? Should I make an empty node with a draw callback, where
> the node's draw traversal mask gets turned on only when I want
> to change cursors? Or is there a better way of handling this?
>
>-- End of excerpt from Kevin Russo

I think a better way would be to place a structure in shared memory containing
all such info (e.g. wireframe mode, disable texturing, cursor shape). This
structure should be allocated before pfConfig (i.e. before performer forks
draw and cull processes) so all processes have a pointer to it. The
structure could also contain a counter that was incremented after any data
was changed. Then in the channel draw callback a local static counter can be
compared to see if something has changed.

Another option that I prefer is a little more complicated and addresses the
issue of GUI's in a different way. I have a Motif/Performer example where the
application process opens a window, creates the user interface, and handles all
events. The tricky part is some GLX code that allows the app process to
disconnect from the GLX widget and allow the draw process to connect to it.
This example works with performer 1.1 but should be easy to port to 1.2.

Wade

-- 
-------------------------------------------------------------------------------
Wade Olsen, wade++at++sgi.com, 415-390-1023, Silicon Graphics Computer Systems

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:07 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.