0

I am working on an OpenGL project in C using Xcode 3.2.6. It is a tutorial program and yet I am having problems with it. When I double-click Project.app, it opens for a quarter of a second then closes. The source is:

#import <Cocoa/Cocoa.h>
#include <GLUT/GLUT.h>

int main(int argc, char *argv[])
{
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_RGBA);
	glutInitWindowSize(1000, 1000);
	glutInitWindowPosition(100, 100);
	glutCreateWindow("OpenGL Test");
	glutMainLoop();
}

what am I doing wrong? thanks in advance.

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by YourGamerMom
1

You don't have a display function or an idle function. Not 100% sure if this is the problem since I haven't used glut in a while but from what I remember you need them.

0

You don't have a display function or an idle function. Not 100% sure if this is the problem since I haven't used glut in a while but from what I remember you need them.

thank you; will try!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.