Here is the program from the book OpenGL SuperBible, I have been stuck on it for the past week. I am compiling on a Mac OS X Lion with Xcode 4. I am using the OpenGL and GLUT libraries. Here is the runtime error I am receiving and the sample code. Thanks for all the help, sorry, I’m still a beginner.
On MacOS X 10.7, I’m trying to build a program that uses SDL as its wrapper for OpenGL, and got the same error:
and Googling brought me to this thread, so I tried copy/pasting in the code posted above, and got exactly the same error again. So whatever problem this example code has, seems to be present in the MacOS port of libSDL. It would be great to figure it out and help the SDL folks fix this problem.
I compiled my example program with the following command:
gcc -o test test.c -framework OpenGL -framework GLUT
My exact error message (to help other Googlers find this thread) is:
<Error>: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
<Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
<Error>: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
<Error>: kCGErrorInvalidConnection: CGSNewWindowWithOpaqueShape: Invalid connection
GLUT Fatal Error: internal error: NSInternalInconsistencyException, reason: Error (1002) creating CGSWindow on line 263
It would be great to figure out why CGSWindows are returning NSInternalInconsistencyException.