[osg-users] PFFLT_GSTATE_TABLES equivalence.

Tony Vasile minghia at gmail.com
Tue Feb 23 04:03:44 PST 2016


Is there an equivalent of this Performer call to the following: 


> 
> The function, pfdConverterMode_flt, is provided for affecting the
> behavior of the loader.  
> 
> 	void pfdConverterMode_flt ( int mode, int val );
> 
> PFFLT_GSTATE_TABLES - Selects the number of "indexed pfGeoState"
> 	tables to handle/create while loading databases. Values greater
> 	than zero cause the loader to call pfGSetGStateIndex(3) instead
> 	of pfGSetGState(3). A value of zero or one is otherwise the
> 	same in terms a storage behavior. The default value is zero,
> 	meaning the loader will call pfGSetGState(3) to bind pfGeoState's
> 	to pfGetSet's.
> 



Code:

// The Shared Palette must be accessed in the app process.
  fltSharedPalette* plt = fltGetCurSharedPalette();
 pfList* rnd = (pfList*)plt->rendMap->renditions;

  // If we do not have multiple renditions (geostate tables) then
  // do not attempt to get the ir channel.
  if (rnd->getNum() > 1)
  {
    // Tell Performer to use the IR GeoState table for rendering the models,
    // for the channel.
    pipe->getChan(0)->setGStateTable((pfList*)rnd->get(1));

    // Also force the table to be used in the app process, so that any app
    // processing which needs to parse the geoStates will have valid data.
    pfGeoState::applyTable((pfList*)rnd->get(1));

    // reference table, so that other processes (eg DBASE) can set it
    // for there use.
    _irGStateTable = (pfList*)rnd->get(1);
  }





------------------------
Tony V

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66394#66394








More information about the osg-users mailing list