OpenGL window

Hey everyone. I was checking out the nehe tuts at nehe.gamedev.net and for the first lesson that creates a window for stuff to be rendered to, it uses glaux! >< bleh. As I was looking for a better solution to glaux I saw on these forums that you can use glut to make windows.

However, Im not quite sure on how to go about doing this… could somebody give me a good hard shove in the right direction to create a window and have it wait for stuff to be rendered to it?

Thank you so much for your time.

Cheers,
Brandon

Hey,
You need to get glut32.dll,glut.h and glut.lib files.Search for them online,and install them as insructed.Then jus say #include<glut.h> before your code.And you can find the main() function using GLUT on the opengl.org.Try the Red book.Cheers.

X( Got the stuff typed out however

[Linker Error] Undefined reference to ‘_glutInitWithWindow@12’
[Linker Error] Undefined reference to ‘_glutCreateWindowWithExit@8’
[Linker Error] Undefined reference to ‘glutCreateMenuWithExit@8’

=(

Any help is appreciated.

~Brandon~

Hi,

Go to Project Options, which is in the project menu in Dev-c++.

In the feild called ‘Further object files or linker options’ type the line:

-lopengl32 -lglu32 -lglut32

press Ok.

Your window should open now!

Originally posted by caldiar:

[Linker Error] Undefined reference to ‘_glutInitWithWindow@12’
[Linker Error] Undefined reference to ‘_glutCreateWindowWithExit@8’
[Linker Error] Undefined reference to ‘glutCreateMenuWithExit@8’

try to do this before including glut.h :
#define GLUT_DISABLE_ATEXIT_HACK

If everything said on this thread fails, you may want to try FreeGlut, OpenGLUT, or even OpenGLEAN , all are enhancements over the original aging GLUT.

Thanks guys for your replies.

In response to Aliorithm - I already did that and I managed to cut out all but those linker errors by doing so. Thanks though =)

In response to ZbuffeR - Thanks man, Ill try this out and see if it works.

I appreciate the help guys. Thank you very much for your replies!

~Brandon~