Allan Schaffer (aschaffe)
Fri, 10 Dec 1993 21:12:40 -0800
That's correct, you should only make direct GL calls (like defcursor,
setcursor, etc in this case) from within the draw process.
> 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?
Instead of using an empty node and worrying about traversal masks,
ordering, etc. I would probably implement this by doing the call to
defcursor() (to construct the new GL cursor) in a pipe-initialization
callback, and then do the call to setcursor() in a channel-draw
callback.
See complex.c for an example of setting up the callbacks. Using
complex.c as a base, you would add the defcursor() stuff in the
OpenPipeline() function, and make calls to setcursor() from within
DrawChannel().
Happy hacking,
Allan
-- Allan Schaffer Silicon Graphics aschaffe++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:07 PDT