Complex project, simple problem

Hi,

I have a fairly basic problem of not being able to get glPolygonMode() to work when trying to fill polygons. In this particular branch I am trying to fill the mesh instead of having a wireframe. I use glPolygonMode() as can be seen fromthis commit but also note that on line 183 of main.cpp I call glDrawElements(GL_LINES, 2 * MAP_NUM_LINES , GL_UNSIGNED_INT, 0);. Could this be the problem, or am I completely missing something (which I clearly am!)?

Thank you.

Do you have a buffer bound to GL_ELEMENT_ARRAY_BUFFER?

I’m still looking through your code, so I might find it…but haven’t seen it yet.

Jeff

Could be. Comment out all your glDraw* calls with a primitive type having “LINE” or “POINT” in the name. Then focus on what’s left.

[QUOTE=OceanJeff40;1288797]Do you have a buffer bound to GL_ELEMENT_ARRAY_BUFFER?

I’m still looking through your code, so I might find it…but haven’t seen it yet.

Jeff[/QUOTE]
Yes I do in mesh_generator.cpp file at lines 142 and 143.

I only have one call in main.cpp at line 183, and of course need that to draw.