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

Chris Kuliukas chris at kuliukas.com
Mon Mar 28 20:33:26 PDT 2016

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

	osgViewer::Viewer::Windows windows;
	for(osgViewer::Viewer::Windows::iterator itr = windows.begin();
		itr != windows.end();
		osg::State *s=(*itr)->getState();
		s->resetVertexAttributeAlias(false, 8); // <-- This line

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:

More information about the osg-users mailing list