[info-performer] Re: about opengl call in performer

New Message Reply Date view Thread view Subject view Author view

From: Allan Schaffer (allan++at++sgi.com)
Date: 05/24/2002 10:42:28


bumdai wrote:
> I want to integrate "OpenGL" code to "Performer".
> as you know, you can do camera setting like this,
[...]
> and in the "drawHUD" function, when I programmed like this,
[...]
> Is camera setting with "performer function" disregarded by "gl camera
> function" ?
> Do "performer function" and "gl function" make problem?

The main thing to remember is the sequential nature of the draw callback
function (your drawHUD). Upon entry into the function, the Performer
channel (eyepoint or "camera") position has already been set in the
modelview matrix. It is ready for you to call pfClearChan() and pfDraw().

If you then want to do an overlay (like a HUD), put all the code to
reset the projection and modelview matrices, and the OpenGL code to
render your HUD, after the call to pfDraw().

Take a look at the example
/usr/share/Performer/src/pguide/libpf/C/text.c, it is the ideal
reference for what you want to do.

Allan

-- 
Allan Schaffer                                            allan++at++sgi.com
Engr. Manager, Core Rendering                            1-650-933-2160
Silicon Graphics                                     http://www.sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri May 24 2002 - 10:45:47 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.