🎉 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 and visual studio 2005

Started by
3 comments, last by Sneftel 18 years, 1 month ago
Does anyone knows why the openGL header files (gl.h , glu.h) doenst compile under visual studio 2005 unless i am including windows.h 10x in advance BlackRyder
Advertisement
Because Microsofts implementation of OpenGL, which is what you are using, needs some symbols to be defined which is found in windows.h.
GLee, GLEW, GLUT, SDL, and countless others can be used instead of windows.h. (actually, you need sdl_opengl.h, not sdl.h).
is there a way to use it cross platform without using any of the above such as
glut or other window system ? isn't it what openGL all about a cross platform?

i need to write my classes so there is a samll amount of change when i move to another platform... the graphic engine doesnt need to know that he is running under windows if he use openGL... right ?
Quote: Original post by BlackRyder
is there a way to use it cross platform without using any of the above such as
glut or other window system ? isn't it what openGL all about a cross platform?

OpenGL is a cross-platform API. It is not an OS abstraction layer. Unless you use it with an OS abstraction layer, your code will not be OS-independent. Check out SDL or GLFW.

This topic is closed to new replies.

Advertisement