Convert GraphicsThread/GraphicsOperation to more generic OperationsThread/Operation.

This paves the way to running cull traversals in seperate threads.

Updated wrappers
This commit is contained in:
Robert Osfield
2007-02-02 22:30:36 +00:00
parent bee545b82d
commit 69da91620f
28 changed files with 439 additions and 300 deletions

View File

@@ -103,6 +103,29 @@ void GLObjectsVisitor::apply(osg::StateSet& stateset)
if (_mode & COMPILE_STATE_ATTRIBUTES && _renderInfo.getState())
{
stateset.compileGLObjects(*_renderInfo.getState());
osg::Program* program = dynamic_cast<osg::Program*>(stateset.getAttribute(osg::StateAttribute::PROGRAM));
if (program) _lastCompiledProgram = program;
if (_lastCompiledProgram.valid() && !stateset.getUniformList().empty())
{
osg::Program::PerContextProgram* pcp = _lastCompiledProgram->getPCP(_renderInfo.getState()->getContextID());
if (pcp)
{
pcp->useProgram();
_renderInfo.getState()->setLastAppliedProgramObject(pcp);
osg::StateSet::UniformList& ul = stateset.getUniformList();
for(osg::StateSet::UniformList::iterator itr = ul.begin();
itr != ul.end();
++itr)
{
pcp->apply(*(itr->second.first));
}
}
}
}
if (_mode & RELEASE_STATE_ATTRIBUTES)