Approach to fill a line_strip in openGL

Hello,

I have list of points using which i am drawing the line using GL_LINE_STRIP.
Now i need to fill this line strip with color or create polygons.

Following is how i draw line strip:
[ATTACH=CONFIG]1543[/ATTACH]

Following is how I want to fill it:
[ATTACH=CONFIG]1544[/ATTACH]

How should I approach this ?

Thanks

Well I think you could create polygons and fill the polygons instead of the lines. You can use glu tasselator but it’s obsolete. (see here: http://glprogramming.com/red/chapter11.html)

Otherwise, you’d have to decompose the polygon in triangle and use GL_TRIANGLE to draw.

[QUOTE=TheFearlessHobbit;1288252]Well I think you could create polygons and fill the polygons instead of the lines. You can use glu tasselator but it’s obsolete. (see here: http://glprogramming.com/red/chapter11.html)

Otherwise, you’d have to decompose the polygon in triangle and use GL_TRIANGLE to draw.[/QUOTE]

Thank you so much @TheFearlessHobbit.

Your input helped a lot.:slight_smile: