GL_LINE_LOOP

Hello all,

I’m working on a project in 3.3 and have used GL_LINE_LOOP to outline a complex shape that I’ve built. I can get the image to show up but so far I’ve been at a loss as to how to fill in the area between the vertex’s between the line loops area.

Is there a way through the vertex/fragment shaders to fill in all of the area between the GL_LINE_LOOP or do I have to use something along the lines of GL_TRIANGLE* to get this accomplished?

Thanks

Maybe gluBeginPolygon, gluNextContour, gluTessVertex, gluEndPolygon?
Never tried them, but according to the Blue Book, they should do what you’re asking.

GLU may solve your problem but that uses immediate mode which is:

  1. deprecated in OpenGL 3.3 core (assuming you use the core profile)
  2. inherently slower due to the usage of immediate mode

I would rather try to make GL_TRIANGLE* type of primitives out of the line loop if you want to efficiently render your shape using VBOs.