Sign in to follow this  
serratemplar

How do I use OpenGL/wgl without glut?

Recommended Posts

I can get OpenGL to work on my Windows XP system thru a console app within the glut infrastructure...and while it's functional (and exciting for me who has never used ogl before), I understand already that's pretty restrictive on what you can do with the Window itself. How hard is it to use OpenGL with no more than the glu and wgl headers/libraries? I poked thru the Nehe tutorial and it was 1) really confusing and 2) didn't seem to work. Any help/links/etc as always are appreciated.

Share this post


Link to post
Share on other sites
It's not too much more complicated than setting up a regular GUI window through the Win32 SDK. There are a few more hoops to jump through, but if you're okay with basic Win32, you should be able to hack it. You might want to take a look at Ultimate Game Programming if you don't like NeHe. Most other tutorial sites I know of have switched to a pay format or have gone away. MSDN and the Win32 SDK can be a great help when trying to understand what a function does when the tutorial glosses over it.

Good luck!

Share this post


Link to post
Share on other sites
Quote:
Original post by serratemplar

I can get OpenGL to work on my Windows XP system thru a console app within the glut infrastructure...and while it's functional (and exciting for me who has never used ogl before), I understand already that's pretty restrictive on what you can do with the Window itself. How hard is it to use OpenGL with no more than the glu and wgl headers/libraries? I poked thru the Nehe tutorial and it was 1) really confusing and 2) didn't seem to work.

Any help/links/etc as always are appreciated.


First I love your current user rating: User Rating: 1337

glut is nice because it is very portable and does a lot of the work for you, and other frameworks like SDL can also give those benefits.

If you want to do it all the windowing yourself, there are the White and Black Books for windows and X, respectively. Both books are fairly old, though, and I don't know if there are new versions out there. They cover the basics. I have a copy of the old edition of the OpenGL Superbible. It was mediocre and I wouldn't use the code examples to save my life, but it covered the needed wgl information.

frob.

Share this post


Link to post
Share on other sites
Quote:
Original post by serratemplar
Wait, are you saying that SDL can do the wrapper-thing like GLUT does for OpenGL? And thank you =) I don't mind being "1337" for a little while.


Yes, you can get a GL window and do whatever you want with it. The API also has a bunch of SDL_GL* functions. There is example OpenGL code on the SDL site. There's also a bit in their wiki.

frob.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this