[osg-users] Draw open polygon

Robert Osfield robert.osfield at gmail.com
Thu Nov 17 02:24:30 PST 2016

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.


More information about the osg-users mailing list