[osg-users] Visualizing triangle data

Robert Osfield robert.osfield at gmail.com
Thu Jun 14 00:18:06 PDT 2018


HI Sam,

Have a look at the osggeometry example as this illustrates how to set up
geometry data, which includes triangles.  For the traingle mesh what you'll
likely want to do is use an osg::DrawElementUShort(GL_TRIANGLES) and then
add you triangle indices to this.

Robert.

On Wed, 13 Jun 2018 at 22:51, sam <brkopac at gmail.com> wrote:

> Hi All,
>
> I am working on reverse engineering a mesh format. I've managed to
> successfully get the mesh to draw and texture. I'm now working on
> visualizing the walkable data that is against the mesh. I think I've
> dissected the section of the format that stores that information and it
> looks like such:
>
> [image: image.png]
>
> The actual mesh itself is made out of vertex and indexs. However, this
> section for each walkable triangle seems to not share any vertices.
>
> My question is, what is the best way to visualize this data in OSG? I'd
> like to be able to toggle them on and off when the entire map is rendered
> to view the flags. Solid colored triangles would be preferable.
>
> Thanks, Sam
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180614/93964fa9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 14194 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180614/93964fa9/attachment.png>


More information about the osg-users mailing list