Ryan McKinley (rmckinle++at++curly.ucsd.edu)
Tue, 19 Aug 1997 21:19:16 -0700 (PDT)
I'm running Performer 2.1 on a single processor RE2. I want to open a
single channel window, get keyPress information in that window, and be
able to make OpenGL calls directly to that window. I know this is
possible (it's in the FAQ) but I haven't had success with the OpenGL
part.
I'm using:
pfOpenPWin(pw);
dsp = pfGetCurWSConnection();
win = pfGetPWinWSWindow(pw);
XSelectInput(dsp, win, KeyPressMask );
XMapWindow(dsp, win);
to open the window now.
in the main loop, I want to call something like:
glDisable(GL_LIGHTING);
glDisable(GL_COLOR_MATERIAL);
glColor3f(1.0, 0.0, 0.0);
glBegin(GL_LINE_LOOP);
glVertex3f(5.0, 2.0, 1.0);
glVertex3f(5.0, 2.0, 6.0);
glVertex3f(5.0,12.0, 6.0);
glVertex3f(5.0,12.0, 1.0);
glEnd();
glEnable(GL_COLOR_MATERIAL);
glEnable(GL_LIGHTING);
I also have a question about callback routines...
perfly sets up callback functions like this:
// Set the callback routines for the pfChannel
pfChanTravFunc(chan, PFTRAV_APP, AppFunc);
pfChanTravFunc(chan, PFTRAV_CULL, CullFunc);
pfChanTravFunc(chan, PFTRAV_DRAW, DrawFunc);
It there any advantage to using callback routines if I'm running on a
single processor machine?
If so, what types of things should go in AppFunc and DrawFunc?
Thanks for your help,
Ryan
=======================================================================
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:45 PDT