<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Gianni, <br>
<br>
<br>
<br>
<blockquote cite="mid:1474529803.m2f.68692@forum.openscenegraph.org"
type="cite">
<pre wrap="">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</pre>
</blockquote>
So basically you are raping the primitive sets to color the
primitive?<br>
That is certainly a complicated way in case you simply have a bunch
of triangles which you want to re-color during selection. I'd advice
to use an additional vertex-attribute (per vertex) holding your
"color-index" and evaluate it in the vertex-shader and modify this
based on the intersected indices. <br>
<br>
just my 2 cents<br>
Cheers<br>
Sebastian <br>
<blockquote cite="mid:1474529803.m2f.68692@forum.openscenegraph.org"
type="cite">
<pre wrap="">
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:
<a class="moz-txt-link-freetext" href="http://forum.openscenegraph.org/viewtopic.php?p=68692#68692">http://forum.openscenegraph.org/viewtopic.php?p=68692#68692</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<br>
</body>
</html>