[osg-users] setUseVertexAttributeAliasing and frame buffer objects not working together

Robert Osfield robert.osfield at gmail.com
Tue Mar 29 01:19:31 PDT 2016


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 <chris at kuliukas.com> 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
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160329/8c835802/attachment-0003.htm>


More information about the osg-users mailing list