Jump to content
  • Advertisement
Sign in to follow this  
CDProp

Initializing OpenGL with Win32 without GLUT, WGL, etc.

This topic is 3271 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A lot of tutorials don't seem to touch on this, but if I wanted to create my own window manually using Win32, is there a way to init OpenGL for use with it?

Share this post


Link to post
Share on other sites
Advertisement
No, as far as I know. OpenGL is OS-independent and you need to bind your rendering context to OpenGL in some way, which is WGL in case of Win32. WGL is the lowest-level access you can get, and higher-level libraries (like GLUT) use it under the hood.

Share this post


Link to post
Share on other sites
If you want to use win32 for OpenGL you can check out the Nehe tutorials at http://nehe.gamedev.net/. Also if your interested in setting up OpenGL ver 3 and up you can check out dhpoware at http://www.dhpoware.com/index.html. There are a couple of books you can look at also such as Beginning OpenGL Game Programming editions one and two (third edition uses SDL I believe). But if you want to learn win32 and eventualy win64 in more detail though, I suggest you take a look at Programming Windows Fifth Edition, and Windows System Programming Third Edition.

Share this post


Link to post
Share on other sites
http://www.amazon.com/OpenGL-Programming-Windows-95-NT/dp/0201407094

"OpenGL Programming for Windows 95 and Windows NT"

Yeah, I know we're on Vista now, but the Win32 bits are the same. It'll get you through the basics of opening a window, faffing about with device contexts, pumping and dispatching messages and so on.

The other alternative would be to look at the OpenGL Superbible, which has 3 chapters on getting basic stuff up and running for each of Linux/UNIX, Windows and Mac.

If you ever plan on cross-platform stuff, it's worth reading the other chapters just so you don't make architectural decisions which will make porting harder.

The rest of the book is just so damn useful to have lying around that it ought to be on your christmas list anyway.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!