Actually, the modelview matrices I get (from CullVisitor::getModelViewMatrix() 
inside the operator()(Node*, NodeVisitor*) of a cull callback) do seem correct. 
It is just that I may not fully grasp what they actually contain at that point 
in the code. I thus have a couple of additional questions:

1) I have the impression they do not incorporate the viewing transform, and 
hence are just local-to-world matrices at that point. Could you please confirm 
this?
2) What would be a desirable way to retrieve the current viewing transform? 
Would calling 
Code:
cullVisitor->getRenderInfo().getView()->getCamera()->getViewMatrix()

 be a nice way of doing it?
2) My goal is to send the previous frame's modelview and projection matrices to 
my vertex shader via uniforms. Would it make any difference to add such 
uniforms to the stateset of a Geode (via a NodeVisitor) or to add them the 
stateset of a Drawable (via a Drawable::CullCallback), given the fact the 
Drawable has been added to the said Geode? Would it affect the way uniforms are 
uploaded?

Thanks in advance. :)

Cheers.

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





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to