[osg-users] Rendering double triangles as one quad
OpenSceneGraph Users
osg-users at lists.openscenegraph.org
Mon Jun 1 06:35:09 PDT 2020
Hello osg forum!
My current way of rendering mesh is through GL_TRIANGLES,
indices = static_cast<osg::DrawElements*>(new osg::DrawElementsUShort(GL_TRIANGLES));
here is an example of a cube face mesh
https://imgur.com/a/AajeO4b
, where i push in the indices as 0,1,2,2,3,0.
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.
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.
Thanks in advance, i'll add more information if needed
//Best regards Dan
--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/f2317fb0-5ca6-4ff8-83d1-174d713d26ef%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200601/824dc272/attachment.html>
More information about the osg-users
mailing list