<div dir="ltr"><div>Hi,</div><div><br></div><div>you can try GL_QUADS</div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Mon, Jun 1, 2020 at 3:51 PM OpenSceneGraph Users <<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr">Hello osg forum!<div><br></div><div>My current way of rendering mesh is through GL_TRIANGLES, </div><div><br></div><div><div style="border:1px solid rgb(187,187,187);background-color:rgb(250,250,250)"><code><div><pre style="color:rgb(0,0,0);font-size:medium"><span style="color:rgb(252,233,79)"><span style="color:rgb(0,0,0)">indices</span></span><span style="color:rgb(190,192,194)"><span style="color:rgb(0,0,0)"> </span></span><span style="color:rgb(214,187,154)"><span style="color:rgb(102,102,0)">=</span></span><span style="color:rgb(190,192,194)"><span style="color:rgb(0,0,0)"> </span></span><span style="color:rgb(69,198,214);font-style:italic"><span style="color:rgb(0,0,136)">static_cast</span></span><span style="color:rgb(214,187,154)"><span style="color:rgb(102,102,0)"><</span></span><span style="color:rgb(255,183,80)"><span style="color:rgb(0,0,0)">osg</span></span><span style="color:rgb(214,187,154)"><span style="color:rgb(102,102,0)">::</span></span><span style="color:rgb(255,183,80)"><span style="color:rgb(102,0,102)">DrawElements</span></span><span style="color:rgb(214,187,154)"><span style="color:rgb(102,102,0)">*>(</span></span><span style="color:rgb(69,198,214);font-style:italic"><span style="color:rgb(0,0,136)">new</span></span><span style="color:rgb(190,192,194)"><span style="color:rgb(0,0,0)"> </span></span><span style="color:rgb(255,183,80)"><span style="color:rgb(0,0,0)">osg</span></span><span style="color:rgb(214,187,154)"><span style="color:rgb(102,102,0)">::</span></span><span style="color:rgb(255,183,80)"><span style="color:rgb(102,0,102)">DrawElementsUShort</span></span><span style="color:rgb(214,187,154)"><span style="color:rgb(102,102,0)">(</span></span><span style="color:rgb(255,106,173)"><span style="color:rgb(0,0,0)">GL_TRIANGLES</span></span><span style="color:rgb(214,187,154)"><span style="color:rgb(102,102,0)">));</span></span></pre></div></code></div><div><br></div>here is an example of a cube face mesh </div><div><br></div><div><a href="https://imgur.com/a/AajeO4b" target="_blank">https://imgur.com/a/AajeO4b</a><br></div><div><br></div><div>, where i push in the indices as 0,1,2,2,3,0. </div><div><br></div><div>What i would like to accomplish is creating a facet of vertex 0,1,2,3 by drawing triangles but without visualizing the diagonal line, so that it looks like one single quad. if i draw my elements using GL_LINE_LOOP i accomplish this but that creates complications as the osg intersector does not work since no facets are being created. </div><div><br></div><div>How would you go about solving this issue? Naturally, im flexible in how i generate my mesh, im writing the fragment/vertex shaders myself as well so if there is a way of hiding the line there its an option. </div><div><br></div><div>Thanks in advance, i'll add more information if needed</div><div><br></div><div>//Best regards Dan</div><div><br></div><div><br></div><div><br></div></div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com" target="_blank">osg-users+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/f2317fb0-5ca6-4ff8-83d1-174d713d26ef%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank">https://groups.google.com/d/msgid/osg-users/f2317fb0-5ca6-4ff8-83d1-174d713d26ef%40googlegroups.com</a>.<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank" rel="noreferrer">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br clear="all"><br>-- <br><div class="gmail_signature" dir="ltr">trajce nikolov nick<br></div>