[osg-users] Draw open polygon

Bruno Oliveira bruno.manata.oliveira at gmail.com
Thu Nov 17 16:02:41 PST 2016


Thank you Robert, that's perfect!

2016-11-17 10:24 GMT+00:00 Robert Osfield <robert.osfield at gmail.com>:

> Hi Bruno,
>
> On 17 November 2016 at 10:11, Bruno Oliveira
> <bruno.manata.oliveira at gmail.com> wrote:
> > How does one draw an open polygon using whether OSG API's or OpenGL
> > primitives?
> > I know how to draw, for instance, a filled rectangle, but how do I draw a
> > filled rectangle with a hole inside?
> >
> > My data structures are stored as follows: a vector of the outward
> polygon's
> > vertices in clockwise order (e.g. filled rectangle), and then a vector of
> > "holes" stored as a vector of vertices in counter-clockwise order
>
> The osgUtil::Tessellator will be able to take these polygons and
> generate an osg::Geometry for you.  See the osgtessellate example.
>
> Robert.
> _______________________________________________
> 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/20161118/8864de07/attachment-0003.htm>


More information about the osg-users mailing list