[osg-users] Pick and Drag question

Bo Jiang jb4652 at gmail.com
Sun Sep 28 06:32:18 PDT 2008


Deal all,
   I have a question about using Pick and Drag in OSG.
   Assume I have a "Light", a rectangle geometry with a texture( some
white alternating with black stripes ) and another rectangle geometry
face to it. As it is a "light", I can use GLSL to draw the pattern of
light texture on the geometry face to it by the position of the
camera( eye ) and some simple geometry optics properties.
   But I have now rotate and translate the light and the pattern of
light texture on the geometry face to the light should also rotate and
translate at the same time. I follow "Examples osgmanipulator" but
find that I can not get the matrix I need using in fragment shader to
calculate the rotate and translate matrix, what I can get is
_activeDragger->getMatrix().
   Would somebody show me how to achieve my target? Thanks very much.



More information about the osg-users mailing list