Re: XForms: OpenGL and xforms

Steve Lamont (spl@szechuan.ucsd.edu)
Mon, 29 Sep 97 20:27:25 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

>From Mineo Morohashi <moro@aa.cs.keio.ac.jp> :
> I'm making a certain program using OpenGL, and xforms.
> There should be two windows, one of them is showing a graphics written
> with OpenGL library, and the other is showing a control panel written
> with xforms library. Former one shows no problem, but the latter one
> shows a message to console like this: "Failed to share colors. Using
> private colormap", and the window is shown, but nothing else. Can you
> figure out what's wrong?

It sounds as if the OpenGL part of the application is starting up
first (probably running in indexed color mode) and is devouring the
colormap before the XForms part of things can get started. Probably
the easiest thing to do is to pop the control panel window first and
then bring up the OpenGL window. This may cure the problem, depending
upon how the color map management is handled in the OpenGL part of the
application.

If it is not necessarily feasible or appropriate for you to actually
display the XForms control panel, you might want, as part of your
initialization, to create and initialize the control panel form but
not display it. This can be cone with the call
fl_prepare_form_window(), which initializes the Window but does not
map it. The function fl_show_form_window() may be used to then map
the window when it's actually needed. You'd obviously do this
*before* the OpenGL window is created, initialized, and mapped.

Hope this helps.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/