Re: help upgrading from Performer 1.2 to Performer 2.2
MLM Veraart (Veraart++at++fel.tno.nl)
Thu, 06 May 1999 16:42:06 +0200
Baez Elbert M NPRI wrote:
>
> Hello:
> As part of my job I have been upgrading an old C Performer 1.2
> application to C++ Performer 2.2. While doing so I came across a function
> that is causing compiling errors. This function goes by the name of
> texgen().
> Here is a piece of the Performer 1.2 source code I have been trying
> to port to Performer 2.2.
>
> int PreDrawReflMap(pfTraverser *, void *)
> {
> texgen(TX_S, TG_SPHEREMAP, 0);
> texgen(TX_T, TG_SPHEREMAP, 0);
> texgen(TX_S, TG_ON, NULL);
> texgen(TX_T, TG_ON, NULL);
>
> return NULL;
> }
>
> And these are some of the error messages I have been getting from
> the C++ compiler (in Irix 6.5).
>
> "omni_effects.cc", line 1174: error(1020): identifier
> "texgen" is undefined
> texgen(TX_S, TG_SPHEREMAP, 0);
> ^
>
> "omni_effects.cc", line 1174: error(1020): identifier "TX_S"
> is undefined
> texgen(TX_S, TG_SPHEREMAP, 0);
> ^
>
> "omni_effects.cc", line 1174: error(1020): identifier
> "TG_SPHEREMAP" is
> undefined
> texgen(TX_S, TG_SPHEREMAP, 0);
> ^
>
> I did a "man texgen" and this is partly what it showed:
>
> NAME
> texgen - specify automatic generation of texture
> coordinates
>
> FORTRAN SPECIFICATION
> subroutine texgen(coord, mode, params)
> integer*4 coord, mode
> real params()
> .
> .
> .
>
> This function (texgen()) seems to be a Fortran call, but it was
> called from a Performer 1.2 application. My question is: How can I make a
> call to texgen() from Performer 2.2? Which is the correct way to do it?
>
> Can anyone please help me out with this issue? Any hints will be
> greatly appreciated!
>
This is probably an IrisGL based program. And you hanven't installed the
IrisGL man pages, that's why you get the fortran man page.
If you are compiling on an OpenGL platform you should use glTexGen().
You can find more in the 'OpenGL Porting Guide' in the Insight library.
Just type 'insight' and open the book.
What you can do also is rewrite the performer code and add to the
GeoState that controls this geometry attributes for a pfTexEnv
(pfNewTEnv) and a pfTexGen (pfNewTGen).
Mario
This archive was generated by hypermail 2.0b2
on Thu May 06 1999 - 07:41:26 PDT