Wow, can't believe my luck at stumbling into the solution for this so quickly..


Code:
        osgViewer::Viewer::Windows windows;
        viewer.getWindows(windows);
        for(osgViewer::Viewer::Windows::iterator itr = windows.begin();
                itr != windows.end();
                ++itr)
        {
                osg::State *s=(*itr)->getState();
                s->resetVertexAttributeAlias(false, 8); // <-- This line
                s->setUseModelViewAndProjectionUniforms(true);
                s->setUseVertexAttributeAliasing(true);
        }




Here is a before / after: http://imgur.com/a/aWoKB


It looks like if you use vertex attribute aliasing it compacts the uniform 
slots by default, which screws up all fixed transform stuff (which I guess 
expects them to be in their usual spots). 
s->resetVertexAttributeAlias(false, 8); prevents it from compacting the uniform 
slots, and it all works.

------------------------
http://www.hrwallingford.com/facilities/ship-simulation-centre 
(http://www.hrwallingford.com/facilities/ship-simulation-centre)

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to