[osg-users] Setting the transform matrices
Sebastian Messerschmidt
sebastian.messerschmidt at gmx.de
Wed Aug 9 01:40:50 PDT 2017
Hi Chris,
Why are you trying to override the default behavior in the first place?
Simply set the node's matrices by adding a transform node with absolute
reference frame as parent/modify the camera's projection matrix. If you
need it per graphics context you might consider using different scene
graphs per camera(thus context).
Rather than asking for on obscure seeming approach, you might get more
ideas by describing what you are after.
Cheers
Sebastian
> 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
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
More information about the osg-users
mailing list