[GRASS5] Re: [GRASSLIST:4115] Re: nviz and polygons
Glynn Clements
glynn.clements at virgin.net
Mon Jul 22 13:58:15 EDT 2002
Markus Neteler wrote:
> > thats probably the best idea. but not very elegant. so that is way i was
> > looking for a more smartly way to solve this problem.
> > thanks.
>
> In general there should be a function in OpenGL to draw filled
> polygons which needs to be implemented in NVIZ.
>
> Does anyone know details how to fill vector polygons with OpenGL?
Filling a polygon is easy: glBegin(GL_POLYGON). However, in OpenGL, a
"polygon" is planar and convex. To fill a non-convex region, you need
to use the GLU tesselator API.
Also, if you wish to "drape" a vector area map over a surface, you
need to cut the region into a mesh of smaller regions along the
surface's grid lines.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list