PDA

View Full Version : GL_LINE_LOOP



zGuilder
09-18-2011, 05:37 PM
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

MaxH
09-18-2011, 06:24 PM
Maybe gluBeginPolygon, gluNextContour, gluTessVertex, gluEndPolygon?
Never tried them, but according to the Blue Book, they should do what you're asking.

aqnuep
09-18-2011, 11:50 PM
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.