JackR
01-30-2007, 09:28 AM
Hello,
I am new to OpenGL and am working on cleaning up someone else's code in Linux. My problem is that whenever I call glutDisplayFunc(class::myfunc_display) or glutReshapeFunc(class::myfunc_reshape), I get the error message:
error: argument of type `void (class:: ) (int, int)' does not match `void (*)(int, int)' for glutRehapeFunc()
and
error: argument of type `void (class:: ) ()' does not match `void (*)()' for glutDisplayFunc()
What puzzles me is that this code has run before with the same functions in the same class as they are now. This leads me to believe that I am missing an essential line of code, but as I am new, I do not know what that might be. I do include <glut.h> in my header file and the following lines run without incident:
glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutInitWindowSize (640+GAP*3, 512+GAP*3);
glutInitWindowPosition (100, 100);
window = glutCreateWindow ("VOLUME");
Does anyone have any suggestions?
Thanks in advance,
JackR
I am new to OpenGL and am working on cleaning up someone else's code in Linux. My problem is that whenever I call glutDisplayFunc(class::myfunc_display) or glutReshapeFunc(class::myfunc_reshape), I get the error message:
error: argument of type `void (class:: ) (int, int)' does not match `void (*)(int, int)' for glutRehapeFunc()
and
error: argument of type `void (class:: ) ()' does not match `void (*)()' for glutDisplayFunc()
What puzzles me is that this code has run before with the same functions in the same class as they are now. This leads me to believe that I am missing an essential line of code, but as I am new, I do not know what that might be. I do include <glut.h> in my header file and the following lines run without incident:
glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutInitWindowSize (640+GAP*3, 512+GAP*3);
glutInitWindowPosition (100, 100);
window = glutCreateWindow ("VOLUME");
Does anyone have any suggestions?
Thanks in advance,
JackR