OpenGL without Windows SDK?

Hello!

I just downloaded Visual C++ 2005 Express (btw it looks nice so far), and I’d like to know if there is a way to use OpenGL without the Windows SDK? i.e. without including <windows.h>.

I want to make a cross-plattform application so I want to use standard librairies only.

Is there a version of gl.h that don’t requires windows.h?

Thanks in advance.

this is very easy to get around

whatever header you are including gl.h do something like this

#ifdef WIN32
#include <windows.h>
#include <GL/gl.h>
//include any other window only headers
#endif

#ifdef LINUX
#include <GL/glx.h>
#include <GL/gl.h>
#endif

#ifdef APPLE
#include <OpenGL/OpenGL.h>
//whateva other stuff apple needs
#endif

but also bare in mind, you set up opengl windows differently on all 3 systems, perhaps you should look into glut or sdl if you are not to keen on doing this

Thank you for answering, I knew you can do something like that, I just didn’t want to download and install the Windows SDK because I felt I should not need it, doesn’t seem logic :frowning:

What I could do also is create my owne <gl.h> that includes <windows.h> and the real <gl.h>, that way my code would looks better at least :slight_smile:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.