Re: Getting started in OpenGL programming?
Re: Getting started in OpenGL programming?
- Subject: Re: Getting started in OpenGL programming?
- From: Chris Szewczyk <email@hidden>
- Date: Mon, 03 Jun 2002 19:34:51 -0400
John,
>
I stuck the whole program into a project builder shell and added the
>
GLUT.framework headers to the project, so now it compiles properly, but
>
I only get a blank window, not the black-on-red squares I should see
>
inside them.
If your program compiles in Project Builder and launches then you have
set it up correctly with OpenGL and GLUT. Note that since you included
the GLUT framework, you only need to #include <OpenGL/gl.h> and not the
entire path to gl.h.
The reason that you don't see a rectangle is that you have not set up a
proper viewing volume and the rectangle is getting clipped. Try adding:
glOrtho( -1, 1, -1, 1, -1, 1 );
right before glutMainLoop();
Hope that helps,
--Chris Szewczyk
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.