Scott Herod (herod++at++aspen.evt.com)
Mon, 22 Feb 1999 15:38:03 -0700
For exactly the same thing, I use
// turn light off
if ( child->isOfType( pfLightSource::getClassType() ) ) {
child->setTravMask( PFTRAV_DRAW, 0, PFTRAV_SELF, PF_SET );
}
and
// turn light on
if ( child->isOfType( pfLightSource::getClassType() ) ) {
child->setTravMask( PFTRAV_DRAW, 0xffffffff, PFTRAV_SELF, PF_SET );
}
>
> PS- has anyone else had problems with useing new for objects like
> pfVec4??? It doesn't seem to agree with the documentation, if I don't
> specify a memory area.....
>
> pfVec3* larry = new pfVec3;
>
> seems to be local (non shared) memory. If I use pfMalloc
> (getSharedArena()) all the problems go away..... This is _NOT_ how the
> man pages describe it working.
I've noticed exactly the same thing when I sat down and
watched memory usage. To be specific, I was losing some
number of bytes when I made geoset colors using new.
I always now use
pfVec3* spam = (pfVec3*) pfMalloc( size, pfGetSharedArena() );
even if I only want one pfVec3.
Scott Herod
scott++at++evt.com
This archive was generated by hypermail 2.0b2 on Mon Feb 22 1999 - 14:38:09 PST