Friday, July 10, 2015

c++ - Starting out with OpenGL when most tutorials are out of date




I'm sure there are already a bunch of questions like this asked, but the constant updating of the OpenGL library throws them all away, and in a month or two, the answers here will be worthless again.


I am ready to start programming in OpenGL using C++. I've got a working compiler (DevCpp; do NOT ask me to switch to VC++, and don't ask me why). Now I'm just looking for a solid tutorial on how to program with OpenGL. My assistant found the tutorial provided by NeHe Productions, but as I've come to find out, it's WAY OUT OF DATE! (although I did pull together a basic window to support an OpenGL canvas)


Then I went online, and found the OpenGL SuperBible, which apparently uses freeglut? But what I'd like to know is whether or not SuperBible 5th edition is up to date any longer. The suggestion to freeglut I found said the latest version was 2.6.0 but now it's 2.8.0!



  • Is the OpenGL SuperBible still a good, and fairly up-to-date place to start?

  • Is there a better place to go to learn OpenGL?

  • Am I allowed to simply store freeglut in the DevCpp include directory (maybe in GL), or is there some important procedure?

  • Are there any comments or suggestions that I didn't think to ask since I'm only just beginning?





@dreta cleared some things up for me, so now I have a better idea of what to ask:


I think I'd like to start out with OpenGL using a wrapper library instead of directly accessing OpenGL.
I just think that, for a beginner, it would be easier for me to program and get good results, while I don't yet have to understand all the grimy details (as @stephelton mentioned).


The problem is, I can't find any library that doesn't have undefined references to no longer supported functions. Freeglut sounds operational, but it still uses GLU.
Does anyone know what I can do?
Also, I tried compiling the first SuperBible's source, but I got errors since GLAPI is not being defined as a type, the error originating in the GLU library.


I'd like to use the SuperBible, but I don't know how to fix this.



Answer



Our resident Nicol Bolas maintains an on-line book about modern graphics programming. It uses modern OpenGL, everything is introduced at an easy to consume pace, it's a good place to start. I've been using it to learn modern OpenGL and it's been doing me wonders in the past 2 months.



Beside that there are bits of knowledge here and there. The OpenGL wiki is quite well maintained. The code isn't "best practices" and sometimes there's ambiguity when it comes to OpenGL version, but outside of those rare occasion, it's a great resource.


If you want to learn about GLSL, there's the GLSL Core Tutorial from lighthouse3D. Though this is the only core knowledge i'd "trust" on the site, rest tends to be outdated.


Once you start to understand how modern OpenGL is done, you'll have an easy time looking for specific information, filtering out outdated code and most importantly reading the specification. You just have to start somewhere.


Most, if not all actually, of the OpenGL books availible are outdated. The new SuperBible is a freak of some sort and i wouldn't recommend it to anybody. The OpenGL Programming Guide for OpenGL 4.1 comes out September 16th, unfortunetly the 7th edition uses deprecated code, so you just have to wait, i sure am.


And ofcourse, you can always ask questions here.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...