there is no nice way, but you can do something like this. For the first render frame walk through all materials und call activate and deactivate on each TextureChunk.

(newbie alert)

i tried to use the traversal function to do this, but i see no change (only wild tumbling solves the problem):

...
traverse(scene, osgTypedFunctionFunctor1CPtrRef<Action::ResultE,
  NodePtr>(wakeupTextures));
...

and

Action::ResultE wakeupTextures(NodePtr& node)
{
if(node->getCore()->getType().isDerivedFrom(Geometry::getClassType())) {
    MaterialPtr matPtr =                        
      GeometryPtr::dcast(node->getCore())->getMaterial();
    ChunkMaterialPtr chunkMatPtr =
      ChunkMaterialPtr::dcast(matPtr);
    if ((chunkMatPtr != NullFC) &&
        (!chunkMatPtr->getChunks().empty())) {
      StateChunkPtr chunkPtr = chunkMatPtr->getChunks(0);
      TextureChunkPtr::dcast(chunkPtr)->deactivate(renderAction);
      TextureChunkPtr::dcast(chunkPtr)->activate(renderAction);
    }
  }
  return Action::Continue;
}

is this the way to do it? ;-)

regards,
simon


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to