Hi Chris, It's hard to know what is causing problems in your case as you don't provide enough information to know what might be amiss. In general, one wouldn't normally combine the built-in usage with vertex aliasing - the later is used to get the OSG to built alteranatives to the built-ins that are no longer available in OpenGL-ES 2.x onwards and OpenGL 3.0 core profile onwards.
Robert. On 29 March 2016 at 04:33, Chris Kuliukas <[email protected]> wrote: > 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 >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

