🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

OpenGL Newbie???...

Started by
3 comments, last by Tallek 24 years, 7 months ago
For some reason, I have a similar problem when including both glut.h and gl.h in my program. I've found that as long as you just include glut.h, it works just fine. Give that a try.

For GL tutorials, check out our (actually, DemoNews) hosted site NeHe (http://www.gamedev.net/hosted/nehe).

Advertisement
GLUT explicitly includes gl.h and glu.h so you don't need to #include them (although you still need to link). This is done for cross-platform compatibility.

The windows openGL header references stuff in window.h for the wgl functions so you have to #include windows.h for gl.h to work right (which you would do automatically if you weren't using GLUT).

The GLUT FAQ actually has a Q (and an A) on this if you want more info, but it basically says "Don't include gl.h and glu.h in your source files."

-the logistical one-http://members.bellatlantic.net/~olsongt
You need to include the .libs
Open up VC++ and once you've started a new project click on...
Projects->settings->link
In the Object/library box before kernal32 type in...
opengl32.lib glu32.lib
Hit ok.
Works the same for DirectX and Glide.

Hi! I am an avid C++ programmer and worked with basic and pascal also. I have been trying to learn a graphics library and have seen most of the ones out there. OpenGL seems to me to be very nice for it is hardware and platform independent and easy to use. I started reading the OpenGL Programming Guide and I tried out the sample program right when I got to it. It worked fine except(using MSVC++ and current lib's) that when I compiled it using GLUT to create a window my gl.h returned a string of the same errors about decl-spec's and unid'ed WINGDIAPI, I have no idea how to fix this problem and think that i will have to figure out how to create the window manually first. But if anyone can help me with this problem in GLUT I would appreciate it. Also if anyone has any idea where I can find good learning and tutorials about openGL and the window spec's for the mac and windows I would be very glad.

Thanks Alot In Advance,
Tallek,
..spells fizzle too much..darn...

Thanks all for the help!

Rhino, thank you for telling me about the tutorial. It was a very good source except now I keep having linking errors with all the gl stuff I put the gl things into the project settings and it reduces it completely except to LIBCD.lib and I am trying to resolve that.

Tallek, any idea's would help
mabye I am just an idiot
or I have bad luck

This topic is closed to new replies.

Advertisement