HI Mat,

On 1 June 2017 at 16:42, Mat Monk <[email protected]> wrote:
> As you said, I created a static box. But i dont understand the shaders 
> function in the example osgshaders.

I guess you must be learning OpenGL/OpenGL Shaders as well as OSG then.

> I found a example of a rotating quad and modified it, so it includes my box 
> instead the quad. But finally i couldn't change the rotation to changing the 
> dimensions in x-direction for examples.

Using callbacks to update the vertices is one possible solution, but
the most heavy-wieght in terms of CPU cost.

If you want to modify the vertices of the geoemtry using a callback
then you've done most of the required steps.  The only thing missing
is that you have to iterate over all the vertices in the Vec3Array.
Vec3Array is  std::vector<osg::Vec3> under the hood so knowledge of
Standard C++ should help here.  Also look at the include/osg/Vec3f
class to see what maths methods are available.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to