[osg-users] different materials for a geometry and highlight

Gianni Ambrosio g.ambrosio+osg at gmail.com
Thu Sep 22 00:36:43 PDT 2016


Hi Nick,
the triangle shown in white has just being added to highlight the selection. We can discard it for a while. For that reason I completly removed the selection highlight in my example. Please see attached code.
If you run the example and select a triangle pushing CTRL+LEFTMOUSE you will see a couple of messages on the console, something like:

"moving from primitive 1 to 0
... BUT why triangle does not change color?"

That's the point!

In my example I have 4 primitive sets:
index 0 = red
index 1 = green
index 2 = blue
index 3 = pink

Picking a green triangle it is moved from the original primitive set (1 i.e. green) to the primitive set with index = 0 (i.e. red). But why the triangle moved from green to red is still green? I would expect it to be red.

Regards,
Gianni

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



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: osgviewer.cpp
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160922/fc24247e/attachment-0002.asc>


More information about the osg-users mailing list