Guenter Schreiber (Guenter.Schreiber++at++dlr.de)
Thu, 18 Mar 1999 19:59:43 +0100
Performer (perfly) randomly does Reflection Mapping on my Geometries.
Well I am using
Textures extensively, sometimes with reflection, sometimes without, so
maybe
this could be a problem ?
If performer accepts the reflection, it does reflection mapping each
triangle separately,
which not beautiful on triangulated surfaces.
I don't know any workaround.
Did anybody face the same problem ?
What can I Do ? Do I have to change the code of libpfiv ?
There are some callback routines, which do the reflection thing.
code snippet from
/usr/share/Performer/src/lib/libpfdb/libpfiv/pfiv.C
...
if (node->getTypeId() ==
SoTextureCoordinateEnvironment::getClassTypeId())
{
cbd->parent->setTravFuncs(PFTRAV_DRAW,
enableSphereMap, disableSphereMap);
}
..
int
enableSphereMap(pfTraverser *, void *)
{
#ifdef IRISGL
texgen(TX_S, TG_SPHEREMAP, NULL);
texgen(TX_T, TG_SPHEREMAP, NULL);
texgen(TX_S, TG_ON, NULL);
texgen(TX_T, TG_ON, NULL);
#else
glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP );
glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
#endif
return PFTRAV_CONT;
}
int
disableSphereMap(pfTraverser *, void *)
{
#ifdef IRISGL
texgen(TX_S, TG_OFF, NULL);
texgen(TX_T, TG_OFF, NULL);
#else
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
#endif
return PFTRAV_CONT;
}
Should this code be changed and pfTexEnv be utilized instead ?
Or do I have to set some additional graphics mode ?
Thanks in advance,
Günter
--
Enjoy life -- enjoy juggling - God gave you that creativity.
...
o o . .
O o o O . O .
|/ \| \|/
| | |
/ \ / \ / \
______________________________________________________________
| Dipl.-Ing. Günter Schreiber | phone: *49/*8153/28/1183 |
| German Aerospace Center | fax: *49/*8153/28/1134 |
| Institute for Robotics and | email: | /|
| System Dynamics | Guenter.Schreiber++at++dlr.de
--------
| P.O. Box 1116 | priv: / | |
/
| 82230 Wessling | Katja_Guenter.Schreiber++at++gmx.de ---+-+--
|________ http://www.robotic.dlr.de/Guenter.Schreiber _________| |/
It is unlawful to use this email address for unsolicited ads
(USC Title 47 Sec.227). I will assess a US$500 charge for
reviewing and deleting each unsolicited ad.
This archive was generated by hypermail 2.0b2 on Thu Mar 18 1999 - 10:59:51 PST