[osg-users] Efficient way to swap colors

tianzjyh tianzjyh at 126.com
Tue Sep 5 18:32:29 PDT 2017


Hi, Antoine,
  I think changing the material of the geometry will be more efficient. Have a look at examples about osg::Material  :)





--

Cheers, 
TianZJ



At 2017-09-06 00:31:11, "Antoine Rennuit" <antoinerennuit at hotmail.com> wrote:
>In order to achieve this I thought of using the BIND_OVERALL mode with 2 Vec3Arrays (one array for the white color and the other one for the blue color) and simply swapping arrays to change the color (with osg::Geometry::setColorArray()), and calling dirtyDisplayList() to update.
>
>Is this the most efficient way of changing the osg::Geometry color?
>Read this topic online here:
>http://forum.openscenegraph.org/viewtopic.php?p=71629#71629

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170906/86056e8c/attachment.htm>


More information about the osg-users mailing list