Glenn Waldron (gwaldron++at++peril.com)
Thu, 06 Mar 1997 08:42:44 -0500
Here's a glwidget init callback that works. (note, it should be
modified
for multiprocess mode). Glenn
-- Glenn Waldron - ANSER Leading Edge Technologies phone/PCS: 703.598.7835 email: gwaldron++at++peril.com voice mail: 703.416.8462
/* ------------------------------------------------------------ * initialize Performer with a gl drawing area widget */ void init_performer(Widget _wij) { pfWSConnection display; pfGLContext context; pfWSDrawable drawable; Widget glwidget; XVisualInfo* vi;
glwidget = _wij;
XtVaGetValues(glwidget, GLwNvisualInfo, &vi, NULL); display = XtDisplay(glwidget); context = glXCreateContext(display, vi, 0, GL_TRUE); GLwDrawingAreaMakeCurrent(glwidget, context); drawable = (pfWSDrawable)glXGetCurrentDrawable(); pfInit(); pfMultiprocess(PFMP_APPCULLDRAW); pfConfig();
pfPipe* pipe; pfPipeWindow* pw; pfScene* scene; pfNode* root;
pipe = pfGetPipe(0); pw = new pfPipeWindow(pipe); chan = new pfChannel(pipe); pw->setGLCxt(context); pw->setWSWindow(display, drawable); pw->setFBConfig(vi);
scene = new pfScene; scene->addChild(new pfLightSource);
chan->setScene(scene); chan->setFOV(45.0, 0.0); chan->setNearFar(1.0f, 10000.0f);
pw->open(); }
======================================================================= 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:54:51 PDT