How do you use OpenGL within windows programming?

Ive tried glut, but want to use windows via Visual C++.

Could anyone give me a link to any tuts on the subject?

In MSDN library ( Microsoft
Help library), You can get the required help.

Check out for a bog standard and legible example of VC++, MFC and OpenGL.

[prerecorded message on]

[prerecorded message off]


If you want to use the Windows API, Nehe’s tutorials are superb. If you want to use MFC the only decent site I found was:

Its not very big but has all the necessary information clearly presented (very helpful for beginners)

You could try the OpenGL super bible.

I personally like Ron Fosner’s white book, it’s really simple and explains OpenGL on Windows, it’s light on the rest of OpenGL but it gives you the essentials of getting the window handle and getting a pixel format descriptor.…1836659-2654957

Others don’t like this book because of it’s brevity, it gave me what I needed without the fluff, but I already had too many OpenGL books.

There’s a slew of stuff online too, look for PIXELFORMATDESCRIPTOR. This is the key WGL structure for creating your OpenGL context, so hits on this are what you are looking for, here are a few interesting pages: