Glenn Waldron (gwaldron++at++peril.com)
Thu, 14 Aug 1997 19:45:59 -0400
I had a similar problem using the Viewkit VkColorChooserDialog
object, which in turn uses the SgColorChooser widget. Under
Performer 2.0, Performer would lose its GLX graphics context
after the widget was instantiated.
This fix worked for me; this code is in the pre-draw pfChannel
callback, and it saves the original context/drawable, and
then restores it every frame: (Opengl only)
static int first = TRUE;
static Display* xdisplay;
static GLXContext context;
static GLXDrawable drawable;
if (first)
{
first = FALSE;
xdisplay = pfGetCurWSConnection();
context = glXGetCurrentContext();
drawable = glXGetCurrentDrawable();
}
else
{
glXMakeCurrent(xdisplay, drawable, context);
}
hope this helps.. note, things work fine under pf2.2 beta without
this fix; I guess they fixed something.. enjoy, glenn
--
Glenn Waldron * Peril Technologies * voice/page: 703.598.7835
mailto:gwaldron++at++peril.com * http://www.peril.com
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:44 PDT