Re: Spaceball SDK w/ Performer?

New Message Reply Date view Thread view Subject view Author view

Don Burns (don_burns++at++peru.csd.sgi.com)
Mon, 26 Oct 1998 11:29:30 -0800 (PST)


Steve,

The probable reason that pw->getWSWindow() returns NULL, is that you are
running in some multiprocess mode and not calling getWSWindow() from DRAW.
DRAW is the only process that has a graphics context and access to the
XWindow.

The way to get at the variable is to have a ConfigFunc for the pipe.
In your code, before calling

        pw->config();

call
        ps->setConfigFunc( myconfigfunc );

myconfigfunc is guaranteed to be called at init time in DRAW. It should call
pw->open() if you intend to have a mapped XWindow. For example :

    static void openPipeWin(pfPipeWindow *pw )
    {
        Display *dpy;
        Window win;

            pw->open();

        dpy = getWSCurConnection();
        win = pw->getWSWindow();

        // Do your Input Device initialization here

    }

Hope this helps.

-don
                 

>
> I have used the X Input method of handleing spaceball input. I have
> also gotten the Spaceball SDK working when using Motif/Xlib. I was
> wondering if anyone has tried using the SDK with the Performer Windowing
> and GUI interfaces. I see that pfuInitInput can take the parameter
> PFUINPUT_X, which (if I understand things correctly) should use X for
> its windowing.
>
> The SDK needs the top level display and window to initialize the
> spaceball. From what I can see the display can be obtained from
> pfGetCurWSConnection(), and it appears that pw->getWSWindow() should
> give the Window (where pw is the pfPipeWindow). However, my program
> crashes and in debugging, the WSWindow is NULL. There is a prWindow
> inside the pfPipeWindow, but there doesn't appear to be any way to
> access it, and I am not sure if that is what I would want anyway.
>
> Anyone have any idea if this is even possible?
>
> Steve
>
> -------------------------------------------------------------------
> Steven Woolsey Associate Engineer/Scientist
> Lockheed Martin Idaho Technologies Visualization Engineer
> Idaho National Engineering Lab. EMAIL: woolsr++at++inel.gov
> P.O. Box 1625, M.S. 3605
> Idaho Falls, ID 83415-3605
> -------------------------------------------------------------------
>
>
>
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Oct 26 1998 - 11:30:25 PST

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