<div dir="ltr"><div>Hi Chris,<br><br></div><div>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.<br><br></div><div>Robert.<br></div><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 29 March 2016 at 04:33, Chris Kuliukas <span dir="ltr"><<a href="mailto:chris@kuliukas.com" target="_blank">chris@kuliukas.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Wow, can't believe my luck at stumbling into the solution for this so quickly..<br>
<br>
<br>
Code:<br>
        osgViewer::Viewer::Windows windows;<br>
        viewer.getWindows(windows);<br>
        for(osgViewer::Viewer::Windows::iterator itr = windows.begin();<br>
                itr != windows.end();<br>
                ++itr)<br>
        {<br>
                osg::State *s=(*itr)->getState();<br>
                s->resetVertexAttributeAlias(false, 8); // <-- This line<br>
                s->setUseModelViewAndProjectionUniforms(true);<br>
                s->setUseVertexAttributeAliasing(true);<br>
        }<br>
<br>
<br>
<br>
<br>
Here is a before / after: <a href="http://imgur.com/a/aWoKB" rel="noreferrer" target="_blank">http://imgur.com/a/aWoKB</a><br>
<br>
<br>
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).<br>
s->resetVertexAttributeAlias(false, 8); prevents it from compacting the uniform slots, and it all works.<br>
<span class=""><br>
------------------------<br>
<a href="http://www.hrwallingford.com/facilities/ship-simulation-centre" rel="noreferrer" target="_blank">http://www.hrwallingford.com/facilities/ship-simulation-centre</a> (<a href="http://www.hrwallingford.com/facilities/ship-simulation-centre" rel="noreferrer" target="_blank">http://www.hrwallingford.com/facilities/ship-simulation-centre</a>)<br>
<br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=66647#66647" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=66647#66647</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</div></div></blockquote></div><br></div>