[osg-users] Shader Update Latency?!

Johny Canes petrussijsma at gmail.com
Sat Feb 11 11:20:12 PST 2017


Again,

Okay this is definitely not a bug, but it seems quite a common pitfall to say the least.

Instead of using viewer.frame(), which is a helper function that "calls advance(), eventTraversal(), updateTraversal(), renderingTraversals()" use the following.


Code:
viewer.advance();

viewer.eventTraversal();
viewer.updateTraversal();

updateShaders();

viewer.renderingTraversals();



This fixed my case of choppy shader updating, due to the slow viewmatrices update.

Cheers,
Johny

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








More information about the osg-users mailing list