Setting up development environment (Windows)

Hello, this is my first post on the forums here.

I’m setting up my development environment on Windows XP SP2, and I have a question. This is what I’ve done so far:

It all works fine, I can write, compile and run simple OpenGL programs with it.

Today I found this page: Moving Beyond OpenGL 1.1 for Windows . So I’ve discovered that the OpenGL header files in the Windows SDK are only the version 1.1 header files… Now the method that that article describes to get access to OpenGL features of newer versions doesn’t sound very convenient - I’d have to do that via extensions, dynamically finding the addresses of additional functions etc.

Are there OpenGL 2.0 header files anywhere that I can use instead of the Windows SDK header files? Would I need to download an SDK from ATI or nVidia to get these? I’d prefer vendor-independent header files… Doesn’t have generic OpenGL 2.0 header files?

Any functions beyond GL 1.1 will need to be accessed via getting function pointers.

There are a number of extension loading libraries out there that will take care of the grunt-work.

hi jes,

solution 1. make sure that all the resource file (used by your program, eg. image, models, etc) are located at the right folder (usually the same folder of your compiled .exe file).

actually, whats the error message?


May I suggest using the handy OpenGL Extension Wrangler Library ( which is much more convenient than the the approach described in “Moving Beyond OpenGL 1.1 for Windows”. This will give you access to all the openGL 2.0 functionality with a simple include and init call.

A good tutorial for installing GLEW on a windows box can be found at

Thanks for the suggestions. Especially GLEW looks interesting. I’ll try it out.

Originally posted by MZIskandar:
actually, whats the error message?
No error message, I’m just wondering how to access OpenGL 1.2 and newer features in an easy way.

Originally posted by Korval:
Any functions beyond GL 1.1 will need to be accessed via getting function pointers.
is it so in windows? i’m programming in linux. i use the header files from nvidia; if i #define GL_GLEXT_PROTOTYPES before including the headers, i can use all functions without having to allocate any funtion pointers. no need to use GLEW.

(i know, i know…if someone with an older libGL would start the prog, it will crash. but i also know that my users do not have old libs :wink: )

Few things are missing in detail inside OpenGL wiki which can be easily understood by a new person picking OpenGL as their graphics library.

  1. How OpenGL is developed in terms of Extensions.
  2. What is Vendor and OpenGL compatibility via Extensions?
  3. Some kind of Grid explaining… OS, OpenGL Version, Vendor1_ext_support, Vendor2_ext_support.
  4. Advise to pick which glVersion or any wrapper lib, graphics card vendor, for different kinds of graphics applications keeping development costs in mind.
  5. What’s there in Focus for future versions of GL.?

I guess wiki developers might have addressed all the above points, but the question is how easily they are visible for new users.



The situation with OpenGL on Windows is like this: Once upon a time, Microsoft and SGI were working together to support OpenGL on Windows. Then some day Microsoft invented DirectX, which included Direct3D, Microsoft’s proprietary API for 3D graphics. At that moment Microsoft decided that they didn’t want to support OpenGL anymore.

So development of OpenGL on Windows stopped at version 1.1. The OpenGL header files are still in the current version of the Windows SDK, but they are still the version 1.1 header files and Microsoft doesn’t bother to update them anymore. Fortunately the builders of graphics cards still provide support for newer OpenGL versions in their Windows device drivers, so we do have up-to-date OpenGL support on Windows. It’s just a little hard to use all the newest features.

So now there are a few options if we want to use OpenGL 1.2 or newer features on Windows:

  1. Download and install the SDK from nVidia, ATI or another graphics card vendor (what you’re doing on Linux). The downside to this is that it makes your software dependent on that SDK from that particular vendor. If you’re writing a piece of open source software, that’s not nice, because anyone who wants to build your software will need to download and install the SDK from your graphics card vendor. (The ATI Radeon SDK is 400 MB!).

  2. Use a library like GLEW that makes it easy to get to the OpenGL 1.2 or newer features. Ok, this will make your software dependent on GLEW, but GLEW is at least independent of any graphics card vendor, it’s cross-platform and it’s a lot smaller than the ATI or nVidia SDK.

well, microsoft’s attitude towards opengl is well-known :smiley: it has been discussed in other threads.

i don’t want to start a flame-war here, but if you have linux and a nvidia card you just download the driver from nvidia (less than 10 MB), which includes recent gl.h, glext.h, glx.h & glxext.h. it’s pretty simple.

excuse my ignorance, but why should i download a 400MB sdk, when i just want to make some opengl apps? what is included in it?

I try to keep all my openGL programs cross-platform (linux mainly but also osx, and windows). For that reason just relying on a vendors gl.h, glext.h, glx.h & glxext.h to be up to date with their latest drivers tends to be problematic. This is another reason, besides simplifying and improving the aesthetics of the C-code, that I turn to a cross platform helper like GLEW.

As for size, a quick “ls -alF” shows that GLEW is reasonably sized ( much << 400MB ) on my linux box;

96676 bytes /usr/lib64/libGLEW.a
228840 bytes /usr/lib64/
474288 bytes /usr/include/GL/glew.h