[osg-users] Rendering double triangles as one quad
OpenSceneGraph Users
osg-users at lists.openscenegraph.org
Mon Jun 1 08:40:07 PDT 2020
Hi,
you can try GL_QUADS
On Mon, Jun 1, 2020 at 3:51 PM OpenSceneGraph Users <
osg-users at lists.openscenegraph.org> wrote:
> 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
> <https://groups.google.com/d/msgid/osg-users/f2317fb0-5ca6-4ff8-83d1-174d713d26ef%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
--
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200601/77fc9b67/attachment.html>
More information about the osg-users
mailing list