title: How to fill the shape, made up of GL_LINE_LOOP
body: <p>I'm trying to make do water simulation. But I'm restricted to use 2D, So i started with just making the boundary of the sea by using sine wave, through Gl_Line_loop. but I'm just unable to fill it. I have tried changing it to the Gl_polygon mode but then i don't get the proper shape. here is the code:</p>
  
  <p><a href="http://i.stack.imgur.com/4V6KM.png" rel="nofollow">here is the image of wave, i want to get filled</a></p>