[osg-users] Setting the transform matrices

Chris Kuliukas chris at kuliukas.com
Wed Aug 9 01:35:58 PDT 2017


Hi,

What is the proper way to set the view/projection matrix to a uniform yourself? I've found that trying to deal with the osg_ built-in uniforms which do all sorts of renaming etc is unreliable and would like to be able to just set everything myself manually.

At the moment I'm setting the view / projection matrix uniforms within the camera's initialdrawcallback, but I'm not sure if this is the right way to do it that will ensure the uniform value will only be used within that camera and not within other cameras (since it needs to work across multiple screens and render stages).

Is there some code within OSG that ensures that a uniform assigned to a camera will only apply to the graphics context for the thread that set it?


Thank you!

Cheers,
Chris

------------------------
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=71391#71391







More information about the osg-users mailing list