Luc Leblanc (leblanc++at++atsaerospace.com)
Thu, 16 Oct 1997 16:56:00 -0400 (EDT)
I want to draw some text with OpenGL (in a draw callback) in an overlay
window created with Performer. I have created a pfPipewindow (the graphics
window) and a pfWindow (the overlay window). I have also created a
colormap and allocate colors for it using Xlib functions. I'm pretty sure
all the colors have been successfully allocated and I know my overlay
window is configured properly. But guess what ? My text never appear and I
don't know why. I would like to have code example that draw with OpenGL in
an overlay window created with Performer. Where can I find it ?
I have checked the Peformer example but they are all with IRIS GL instead
of OpenGL.
For those of you who can be interested, there is my draw callback:
static void DrawChannel (pfChannel *channel, void *data)
{
/* rebind light so it stays fixed in position */
pfLightOn(Sun);
/* erase framebuffer */
pfClearChan(channel);
/* invoke Performer draw-processing for this frame */
pfDraw();
/* Select the overlay window */
pfPWinIndex(Shared->pw, PFWIN_OVERLAY_WIN);
pfSelectPWin(Shared->pw);
/* Select a color for OpenGL in color index mode */
glIndexi(tdPixel[50]);
pfPushState();
pfBasicState();
glDepthFunc(GL_ALWAYS);
glDepthMask(GL_FALSE);
glRasterPos3f(0.5f * (Shared->bsphere.radius), 0.0f, 0.5f *
(Shared->bsphere.radius));
drawXFontString("TEXT IN SCENE");
pfPopState();
glDepthFunc(GL_LEQUAL);
glDepthMask(GL_TRUE);
/* Reselect the graphics window */
pfPWinIndex(Shared->pw, PFWIN_GFX_WIN);
pfSelectPWin(Shared->pw);
}
This code work when I'm not drawing in the overlay window.
Thanks in advance...
Luc Leblanc
Software Designer
RTG&E Group
TEL : (514) 441-2507 ext. 318
FAX : (514) 441-6789
________________________________________________
_/_/_/ _/_/_/_/_/ _/_/_/_/_/
_/ _/ _/ _/
_/_/_/_/ _/ _/_/_/_/_/
_/ _/ _/ _/
_/ _/ _/ _/_/_/_/_/ Aerospace Inc.
___________________________________________
=======================================================================
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:56:05 PDT