From: Graham S. Rhodes (grhodes++at++sed.ara.com)
Date: 05/17/2000 07:06:16
Hello,
I've recently been working on an IRIS Performer application that includes a
dynamic texture transform. The texture is translated and scaled. The
transform data are stored in a struct that is in a shared arena. I am using
OpenGL functions to apply the transform inside draw traversal callbacks.
Following are the important parts of my two traversal callbacks:
static int PreDraw(pfTraverser *tv, void *userdata)
{
double transl = 0.0, scalf = 1.0;
// get transl and scalf from a pfFlux given by userdata...
GLint mode;
glGetIntegerv(GL_MATRIX_MODE, &mode);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glTranslatef(transl, 0.0, 0.0);
glScalef(1.0/scalf,1.0,1.0);
glMatrixMode((GLenum)mode);
return(PFTRAV_CONT);
}
static int PostDraw(pfTraverser *tv, void *userdata)
{
GLint mode;
glGetIntegerv(GL_MATRIX_MODE, &mode);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glMatrixMode((GLenum)mode);
return(PFTRAV_CONT);
}
We have been using Linux to develop the code, but the app also must run on
an Onyx2 machine. IMPORTANT NOTE: The code above works perfectly well on
IRIX/Onyx2, but is not working on Linux. We are using two Linux systems; One
is a Pentium II 400 system with a 3dfx Voodoo3 graphics board----XFree86
3.9xxxx beta hardware OpenGL driver. The second is a Toshiba Tecra 8100
laptop using a SiG accelerated X driver (for the S3 Savage/MX chipset) but
software Mesa (version 3.3.x.x I think---whatever the Performer FAQ suggests
for this) for Performer. I notice on the Mesa page that a bug related to
non-identity texture matrices was supposedly fixed at version 2.6 in 1998...
On the laptop, the texture transform just seems to do nothing. On the 3dfx
board, something happens, but it is not correct.
Does anyone have any ideas about what could be going wrong here?
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
This archive was generated by hypermail 2b29 : Wed May 17 2000 - 07:08:05 PDT