info-inventor-dev
[Top] [All Lists]

Re: Open Inventor with openmotif 2.1.30, success!

To: dennis@xxxxxxxxxxxxxxxxxxxxxx (Dennis Mikkelson)
Subject: Re: Open Inventor with openmotif 2.1.30, success!
From: jlim@xxxxxxxxxxxxxxxxxxxx (Jonathan Lim)
Date: Sun, 17 Sep 2000 00:38:08 -0700 (PDT)
Cc: info-inventor-dev@xxxxxxxxxxx
In-reply-to: <200009170402.XAA20355@xxxxxxxxxxxxxxxxxxxxxx> from "Dennis Mikkelson" at Sep 16, 2000 11:02:34 PM
Sender: owner-info-inventor-dev@xxxxxxxxxxx
On Sat Sep 16 21:02:34 2000, dennis@xxxxxxxxxxxxxxxxxxxxxx wrote:
> 
> Hi Jonathan,
> 
>   Thanks for the explanation of why NULL can't be passed as the name 
> parameter to an XmCreate* routine with Motif 2.1.

I didn't go through the Motif 2.1 source in too much detail, but I believe only
XmCreatePulldownMenu() has that problem; the other functions pass along their
arguments to XtCreateWidget(). I only changed those files that had calls to
XmCreatePulldownMenu().

>   Finally, I found the cause of the problem with the sliders, color wheel 
> and color patches used by the Material Editor.  When compiled against 
> openmotif-2.1.30-4_MLI from Metrolink, on a generic PC with RH 6.2, the 
> devices get drawn using double buffering.  After adding calls to 
> glXSwapBuffers as detailed below, ALL of the Editors work perfectly. :-)  
> I changed the source as follows:

The problem here is that glXChooseVisual() isn't working as it should on your
system (and mine, with Mesa). Note that the sliders do not specify a
SO_GLX_DOUBLE attribute when requesting a visual to associate their GLw drawing
area with in SoXtGLWidget::buildNormalGLXWidget(). For whatever reason, a
doublebuffer visual is returned anyway.

> I don't know what the best way to fix this in the common source tree 
> would be.  Perhaps some conditional compilation option is currently not 
> working as intended with the combination of libraries that I am using.

To work around the bug, I'm including some code to determine if a doublebuffer
visual is returned, and setting the SO_GLX_DOUBLE bit in glModes accordingly.
In the slider source files, I call isDoubleBuffer() to determine whether to
call glXSwapBuffers() or glFlush().

>   By the way, thanks a lot for the excellent work that you and your 
> colleagues have done with Open Inventor, and thanks to SGI for making 
> it available under the GNU Lesser GPL.  We will be using it this semester 
> in our computer graphics course.

No problem. Thanks for your help identifying the bug above.

> Regards,
> Dennis
> 
> --
> Dennis Mikkelson
> dennis@xxxxxxxxxxxxxxxxxxxxxx


              Jonathan Lim  _  Silicon Graphics  _  Mountain View
              GPS Graphics     Computer Systems        CA, USA

<Prev in Thread] Current Thread [Next in Thread>