Hi, I’m having a problem when calling glGetFloatv in the following code:
GLfloat smoothLineWidth, smoothLineGran;
glGetFloatv(GL_LINE_WIDTH_RANGE, &smoothLineWidth); glGetFloatv(GL_LINE_WIDTH_GRANULARITY, &smoothLineGran); cout << "Smooth Line: " << smoothLineWidth << ", Smooth Gran: " << smoothLineGran << endl;
The program compiles fine, but when I try to run it I get the following error:
The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
What could I do? I’m not creating a function pointer, I’m just using a standard OpenGL function. When I found it in the header gl.h the prototype is WINGDIAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
Thanks in advance.