trouble understanding windows/dave a. opengl book

Started by
6 comments, last by CyberSlag5k 19 years ago
I bought the newest OpenGl game book by Dave Astle but I know shit about Windows. I've looked at some tutorials dealing with Windows programming but I get lost fast. Should I just not worry about that and just read the book and type in the codes or what.
Advertisement
You really should have a basic understanding of C++ before you dive into OpenGL. If this is not the case, then you should hold off reading that book and learn the basics first. That way, you will at least be comfortable with the syntax it uses. You do not have to know everything about windows programming, it just helps in following the examples.

If the Windows code is bogging you down, then that's quite common. The Win32 API is not something that is easy to learn and follow. I say go ahead and see what you can do, if you keep on feeling lost, then stop and back track a bit first and learn some more stuff before you go again. It all depends, what do you have experience with now?
I have read beginning C++ game programming (if anyone has read that). And I have read Game Programming All in One (2d graphics using Allegro). Im fairly well with C++ and understand 3d graphics.
You could try using SDL. Its much simpler than Win32. Because its an OpenGL book I wouldn't think that it would be to hard to use a different windowing API. But I've never read that book so I cant be sure.
Well in that case you should be ok for going on. The Win32 parts are just specific to Windows, so a deep understanding is not needed. You will slowly start to understand the W32 stuff, but keep in mind this book is on OpenGL game programming, not Windows.

So with that said, you might want to cosider using some other framework that supports OpenGL, such as SDL, Allegro, GLFW, GLUT, etc.. to do the actual OpenGL code in. That way you can make sure you learn the OpenGL specifics without having to worry about the Win32. So give it a try and go on, if things get too *blah*, you can always take a break and try an alternative method. Just don't give up and keep at it and you will be making games in no time [wink]
There's a more in-depth Win32 primer on the CD that should be enough to get you by.

I really wish we'd had time to include SDL in the book. I'm going to have to try to find some time to convert all the demos to SDL and upload them to the book's website.
why you don't use glut? it is really simple!
Quote:Original post by Eitsch
why you don't use glut? it is really simple!


GLUT gets my vote, but I think that might change as I become more familiar with SDL. GLUT is super easy to set up, but it's somewhat limited feature-wise and it's not supported well (I still don't know of a way to capture a mouse-wheel scroll event). That's where SDL takes the lead. From what I've seen it's pretty simple to setup as well (haven't done it myself), has an event processing similar to Win32's (which is convenient), and has a ton of easy to use features. Oh yeah, and it's not Win32, which means your program is now cross-platform!

Uh oh, I think I've "Flip flopped", just like John Kerry. It looks like I originally decided on something, took a better look at the evidence and then had the audacity to change my position to reflect better judgement. Despite the fact that it appears I'm unfit for political office in the US, I'd go with SDL.

Good luck!
Without order nothing can exist - without chaos nothing can evolve.

This topic is closed to new replies.

Advertisement