How filled polygon wrap over the terrain?

Hi!

I have to display over the terrain some filled polygons. Polygon borders and its colours are known. Polygons can be convex or concave. I tessellated concave polygons using glu tessellator.
Can anybody advice me how to wrap these polygons over the terrain?
Thank you an advance.

Can you tell me what you mean under wrapping? My english is poor. You want to project it onto a surface?

Originally posted by orbano:
[b]Can you tell me what you mean under wrapping? My english is poor. You want to project it onto a surface?

[/b]

My English is also poor. I’ll try to explain you what I mean.
I have a 3D terrain. I used a CLOD algorithm to generate terrain surface. Over the terrain I want to display some filled areas with different colours. I generated a texture with filled polygons. This solution is working, but image quality is depended of texture resolution. Size of texture depends of resolution. Of course I split terrain in tiles. For very big terrains this solution will be very expensive. I think to keep in database only polygons and their colours and display polygons dynamically using stencil buffer. I think to use stencil shadow volume of each filled polygon projected on the terrain. What do you think about this?
Thank you.

I think to keep in database only polygons and their colours and display polygons dynamically using stencil buffer. I think to use stencil shadow volume of each filled polygon projected on the terrain.

This should work, but may be quite slow, as anything using stencil buffer. Specially if you need many projected polygons.

If those polygons are static, you can try to clip the extruded polygon against the terrain. Go to the “math & algorythms” forum to have help on this.