Performer ViewKit interface problems!

New Message Reply Date view Thread view Subject view Author view

From: Aaron Jones (aaron++at++arlut.utexas.edu)
Date: 04/26/2001 09:36:48


Hello all,

Please let me pre-apologize for the long message. I am utterly stuck on

this problem, so I will present here as much as I can figure out about
it, and hopefully someone will recognize the problem. =)

I am trying to port an application using Volumizer/Performer/OpenGL,
using a ViewKit gui from an Onyx2 (os and software specs below) to an
Octane2(specs also below).

It works very nice on our Onyx2, which is running irix 6.4, OSF/Motif
Exec Enviornment 1.2.4, ViewKit Exec Enviornment 1.5.0, Volumizer 1.1,
and Performer Exec Enviornment 2.0.4 with what appears to be a million
and a half patches and compatibility dso's (if it becomes relevant,
I could probably post them, but the list is LONG).

The octane2 is running IRIX 6.5, Motif's eoe (Motif 1.2 and 2.1
Combined) for 6.5.10m,
ViewKit exec enviorn 1.5.3, Volumizer 1.2, and performer 2.2.1.

Somewhere in between the versions of either Motif, ViewKit, or
Performer, something changed. I ruled out the possibilty that the
Volumizer code is causing the problem (ie written for the Onyx2 hardware

specifically) by running a purely Performer/Volumizer app without the
gui, and it ran just fine on the octane2.

My suspision is that it has to do with interfacing Performer into an
OpenGL widget, or the creation and configuration of the glwidget to
become the main graphics window. The gui code was generated with
rapidapp, and they
attached the Performer window to the glwidget by saying

  /* set pfPipeWindow parameters from the Motif widget */
  Shared->pw->setWSDrawable(NULL, Motif->gXWin);
  Shared->pw->setWSWindow(NULL, Motif->gXWin);

Motif->gXWin is set with this code:

Motif->gXWin = XtWindow(_bulletinBoard -> getGLWidget());

getGLWidget looks like this:

Widget BulletinBoardUI::getGLWidget()
{
 return _glwidget;
}

Unfortunately for me, the creators of this code are not around.

OK, all of this explanation, let me tell you the symptoms:

when the application comes up, the gui pops up looking correct in
everything but the Performer window. A second window pops up, but is
only as big as the button in the top left corner for interacting with
the window manager (close, move, etc.). One pixel of the gui is black
in the top left corner. The GL widget is supposed to have a 10 pixel
offset from the corner. It is as if the main window is getting set as
the main graphics window.

I noticed that if I added the code:

 Display *dpy = XOpenDisplay("");
    XWindowAttributes watt;
    XGetWindowAttributes (dpy, Motif->gXWin, &watt);
    cout<<"Window width and height: "<<watt.width<<'
'<<watt.height<<endl;

the output is 1, 1, which explains why I only get on pixel on the gui.
However, why it is 1,1 is beyond me!

The glwidget is defined as follows:

    _glwidget = XtVaCreateManagedWidget ( "glwidget",
                                            glwMDrawingAreaWidgetClass,
                                            _baseWidget,
                                            GLwNrgba, True,
                                            GLwNdoublebuffer, True,
                                            GLwNallocateBackground,
True,
                                            XmNx, 10,
                                            XmNy, 10,
                                            XmNwidth, 500,
                                            XmNheight, 500,
                                            GLwNvisualInfo, vi,
                                            (XtPointer) NULL );

If I explicitly set Shared->pw->setSize(512, 512), then the same code
ALMOST works.

What happens is that the same second window opens (to size 512, 512) and

displays nothing, and things other than that work ok. There, however,
is still the problem of of the offset.

A second problem occurs when I try to put it into a special mode (stereo

which requires special glasses to look at, the monitor does not change
resolutions, it merely displays two images side by side, and the glasses
are mirrored to show each eye its own view). The code uses a bunch of
XtVaSetValues commands to stretch the gui out, move the scale widgets
and stretch the opengl window. Let me reiterate that it works perfectly

on the Onyx2. On the Octane2 though, the main gui window expands just
fine. But the widgets don't move, and the gl window doesn't expand.
Perhaps it is as simple as needing a different command to change it,
rather than set it, but I have had no luck. The code for moving the
widgets looks like (one example is:)

  // Contrast Slider
  XtVaSetValues ( _contrastscale,
    XmNx, 690+700,
    (XtPointer) NULL );

the code for expanding the gl widget is:

  XtVaSetValues(_glwidget,
    XmNwidth,500+700,
    (XtPointer) NULL);

The sizes are written as summations to make it clear exactly what is
going on. The 500 is the original size, and they are expanding it by
700.

So in summary, for some reason, the program thinks that the graphics
window is 1 by 1, the Performer Pipewindow pops up in the background for
no apparent reason, displaying nothing, and my widgets don't move when I
use an XtVaSetValues command...

So if anyone knows what is wrong here, I would appreciate the help
VERY VERY VERY much.

Thanks,
Aaron


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Apr 26 2001 - 16:38:56 PDT

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