Mixed Model with a Spaceball.

New Message Reply Date view Thread view Subject view Author view

Frank J. Cherne (fjcherne++at++crimson.mse.arizona.edu)
Mon, 13 Mar 1995 18:38:16 -0700


For some reason I am stuck. I am trying to utilize a Spaceball with Performer
using a GLX model. This is what I have tried, I hacked cube.c a mixed model
non-Performer program. This has shown me how to add devices to the X serving
protocol. Could someone describe how to get a Spaceball device input into an
Performer GLX routine. Here are my assumptions/methodology:
        1. I assume that I need an Xhandler to handle the spaceball events and
                           their corresponding events.
        2. I think that the spaceball generates a DeviceMotionNotify type
event as well as ButtonRelease and ButtonPress type events?
        3. Given 1 and 2, I have a switch on event type that switches on
MotionNotify, ButtonPress, ButtonRelease. see example below:
   switch(event->type){....
      case ButtonPress:
         { if (event->type==spaceball_button_press_event_type){
                pfuevent->dev = MY_SPACEBALL_BUTTON;
                pfuevent->val = SpaceballBut(event);
             }
             else
                pfuevent->dev = PFUDEV_NULL;
             break;
        ...}
When this is done and compilation takes place I get to within my simulation
loop after a the updating of the view and before the pfFrame portion of a
simulation loop, the core gets dumped.

Anyone with suggestions or solutions (sample code) using the Spaceball with
Performer where Xwindows is handling the input, reply either through the
performer mailing list or to my e-mail address
fjcherne++at++crimson.mse.arizona.edu.

Frank


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:51:04 PDT

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