RE: [info-performer] Embedding OPENGL into Performer through Draw Callback

Date view Thread view Subject view Author view

From: Dick Rous (dick++at++sgi.com)
Date: 07/08/2005 07:47:21


Swapbuffers and glFinish are handled by Performer, so no need to code these
yourself. (Especially the glut stuff.)
Also, Performer sets up the projection and the modelview matrix at the start
of each channel, so your code might work correctly.
The safer approach is to embed the OpenGL stuff as follows: pfPushState,
pfBasicState, pf/glPushMatrix <OpenGL> pf/glPopMatrix, pfPopState.

Hope this helps,

Dick.

-----Original Message-----
From: owner-info-performer++at++performer.engr.sgi.com
[mailto:owner-info-performer++at++performer.engr.sgi.com] On Behalf Of Rajesh R
Sent: Friday, July 08, 2005 13:30
To: info-performer++at++sgi.com
Subject: [info-performer] Embedding OPENGL into Performer through
DrawCallback

Dear Performers,

Is there any structure for embedding opengl Programs in my drawCAllback
function. For Instance

void myCallBack(pfChannel *chan, void *data)
{

        /*First OPENGLPERFORMER commands */
                pfChanClear();
                pfDraw();
        /* then OPENGL COMMANDS */
                glMatrixMode(GL_PROJECTION);
                glLoadIdentity();
                glPerspective(); // or glOrtho
                glMatrixMode(GL_MODELVIEW);
                glLoadIdentity();
                //All drawing Commands
                glutSwapBuffers(); // or glFlush

        or
        vice versa

}

I studied the text.c program. I could not makeout necessity of
adding pfPushState,pfBasicState and pfPopMatrix

Any suggestions please.

Rajesh.R
Virtual Reality
Institute for Robotics and Virtual Reality
c/o Centre for AI and Robotics
Defence Research and Development Organization (DRDO)
Ministry of Defence
Bangalore - 1

-----------------------------------------------------------------------
   List Archives, Info, FAQ: http://www.sgi.com/software/performer/
   Open Development Project: http://oss.sgi.com/projects/performer/
                Submissions: info-performer++at++sgi.com
            Admin. requests: info-performer-request++at++sgi.com
-----------------------------------------------------------------------


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Jul 08 2005 - 07:47:32 PDT