hello, I am trying to run the ‘simple.c’ program from the first example in chapter 2 of OpenGL SuperBible 3rd Edition and I am getting this error message:
ben-sanders-powerbook-g4-12:~/OpenGL/SuperBible/simple Ben$ ./simple
2006-01-03 22:34:29.698 simple[411] GLUT Fatal Error: internal error: NSInternalInconsistencyException, reason: Error (1002) creating CGSWindow
Of course, to get it to work with the mac, I changed the simple.c file a little:
#include <GLUT/glut.h>
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <AGL/agl.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();
}
Any suggestions would be greatly appreciated.
Thanks,
Ben