ShowaSanke95
08-31-2012, 12:26 PM
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.
#include <OpenGL/gl.h>
#include <GLUT/glut.h>
void RenderScene(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}
void SetupRC(void)
{
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
}
int main(void)
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("Simple");
glutDisplayFunc(RenderScene);
SetupRC();
glutMainLoop();
return (0);
}
//copied from OpenGL SUPERBBIBLE third edition
//end of code
here is the runtime error I get
Aug 31 15:04:42 ****-pc.home OpenGL Test[771] <Error>: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
Aug 31 15:04:42 ****-pc.home OpenGL Test[771] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Aug 31 15:04:42 ****-pc.home OpenGL Test[771] <Error>: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
Aug 31 15:04:42 ****-pc.home OpenGL Test[771] <Error>: kCGErrorInvalidConnection: CGSNewWindowWithOpaqueShape: Invalid connection
2012-08-31 15:04:42.934 OpenGL Test[771:603] GLUT Fatal Error: internal error: NSInternalInconsistencyException, reason: Error (1002) creating CGSWindow on line 263
I took out my name, what am i doing wrong and why can't I run any of the examples in this book? Thanks for the help.
#include <OpenGL/gl.h>
#include <GLUT/glut.h>
void RenderScene(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}
void SetupRC(void)
{
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
}
int main(void)
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("Simple");
glutDisplayFunc(RenderScene);
SetupRC();
glutMainLoop();
return (0);
}
//copied from OpenGL SUPERBBIBLE third edition
//end of code
here is the runtime error I get
Aug 31 15:04:42 ****-pc.home OpenGL Test[771] <Error>: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
Aug 31 15:04:42 ****-pc.home OpenGL Test[771] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Aug 31 15:04:42 ****-pc.home OpenGL Test[771] <Error>: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
Aug 31 15:04:42 ****-pc.home OpenGL Test[771] <Error>: kCGErrorInvalidConnection: CGSNewWindowWithOpaqueShape: Invalid connection
2012-08-31 15:04:42.934 OpenGL Test[771:603] GLUT Fatal Error: internal error: NSInternalInconsistencyException, reason: Error (1002) creating CGSWindow on line 263
I took out my name, what am i doing wrong and why can't I run any of the examples in this book? Thanks for the help.