I’m drawing an enclosed concave polygon (filled with a color) using the GLUtesselator. The opengl calls that do this are generic. The problem is that it works fine on linux, but the call to gluTessEndPolygon() causes a crash in windows 7 (access violation). I do use these functions:
There is no crash inside of these functions. It happens after the call to glu_tess_end(). glu_tess_error() is not called, and glu_tess_combine() is called once.
Does anyone have any idea about what could cause this or how to debug it?
Not to be glib but have you tried using a debugger? Lots of unexpected crashes can result from seemingly benign coding shenanigans (voice of experience).
I’m using Visual Studio and have stepped through every line of my code. I also step through the linux version with gdb / netbeans (no crash). I know the line of code that it crashes on and that is inside opengl.
I hit breakpoints inside all of these function except GLU_TESS_ERROR. Inside the GLU_TESS_END function I just call glEnd(). This is the function that crashes.