Newbie ...would like guidance

Hello all,

I am looking for guidance with OpenGL.
First let me give a bit of background.

Languages I use: C/C++
Graphics programming experience:
In my early teens I tried to teach myself game programming in 68000 assembly on the ATARI ST platform. Unfortunately, I was trying to do this at the twilight of the Atari scene. I didn’t get very far as I was a programming novice at the time and great inventions like internet message boards, where one could get help, were not available.

In college I took a DirectX game programming series. First class was a 2D class and the 2nd was a 3D class. There wasn’t enough time to go too deep, but the classes did give us a small taste of graphics programming on modern machines using modern graphics cards.
I always planned to get back into it when I had time and when I tightened up my programming skills. I would like to produce elegant software designs for the graphics related programs I create , not a hodge podge of bad code that “just-works”. I would rather use clean design patterns, reusable code, etc.
Well, I think I am ready to start to slowly get back into it, but I don’t think I want to use DirectX. I want to be able to develop graphics applications in Linux and easily port them over to Windows and vice-versa.
I also didn’t really like the DirectX API.

So I guess the question is, where should I start as a beginner with OpenGL? I have seen several books advertised on this site, but I am not sure which ones are the best. Maybe a good Fat book to dive into, with step by step instruction is what I need. A good easy read.

Any recommendations would be appreciated.

Thanks for your time

The Red Book.

Note that the free online version covers OGL 1.1, which is outdated. That doesn’t mean anything in it is wrong; merely that it doesn’t cover the numerous extensions which have appeared since, enhancing flexibility and functionality. Many of the extensions have been incorporated into the core of OpenGL 2.1.

Unfortunately, 2.1 still retains an outdated mindset: OpenGL is still essentially modeled as a state machine, and thus is difficult to wrap in object-oriented code.

OpenGL 3.0 will fix this problem with a completely redesigned API, but there’s no clear indication exactly we should be expecting implementations of that to appear. It’ll be a few months, at least.

I would personally work through the NeHe tutorials:

(The red book is good also)

This book assumes you already know your classic (fixed path) GL, but is a great read for everything related to shaders :
OpenGL Shading Language (2nd Edition) (also known as “the orange book”)

Definitely start with NeHe tutorials, but after you did first 2-3 tutorials and made your first “hello world” programs, you should read the book. After you read it, going through other tutorials will be a lot easier - everything will be more clear.

If you get though the basics and you will want to learn shaders I suggest you read whole OpenGL Shading Language before trying to make even simple shader. It’s better to understand shaders before you start programming - your progress will be much faster.

I also like the OpenGL Reference Manual (Blue Book) which is the reference docs. I know after version 1.4 they stopped making books and posted them exclusively online but I always prefer a good book.

The OpenGL SuperBible is also a great resource. I bought Version 2 and now they have have Version 4 which goes all the way up to OpenGL 2.1. The older versions were all Windows examples though most of it was portable, but now Version 4 is supposed to have examples in MacOS and Linux. I don’t know if Version 4 comes with a CD but my copy of Version 2 contained a CD of all the examples. The great thing about the SuperBible is it would build an example for a couple of “lessons”. Good luck!

Originally posted by sqrt[-1]:
[b] I would personally work through the NeHe tutorials:

(The red book is good also) [/b]

I see he doesn’t give a “Linux Setup”.
I assume I can find that info elsewhere.

The Solaris and OSX setup guides should both be pretty similar to what you’d do under Linux. Basically just link against libgl, libglu, and libglut.

All the examples have linux versions. Just go to the tutorial and scroll to the bottom for all the versions.

Eg. Window setup:

Any specific problem setting up Linux? which distro do you use?

I can only back the others up. I started with the Nehe Tutorials, which are really great to get into the stuff. Back then i also read the Superbible (2nd edition) which was a nicely assembled introduction. I assume the 4th edition will be equally good.

I wouldn’t advise you to read the Orange book just yet, as mentioned above. It won’t help you much to get started with OpenGL in general. Once you got the hang of using shaders, it is a nice to have book.

Bear in mind, that the Nehe Tutorials are very old and most of them are really outdated. They are a great start, but you should know, that many of the things explained there, are done using shaders today. So don’t waste your time on the “advanced” tutorials. Also, display lists are not really worth to look into, today all data should be stored in vertex buffers. In my opinion, after having read the first 5 tutorials, buy the Superbible, it will give you the best up-to-date introduction to OpenGL.

Well then, welcome to OpenGL.

Originally posted by RGHP:
Any specific problem setting up Linux? which distro do you use?
I will be installing Fedora 7 on my desktop and moving all my Windows work over to a notebook. All in the very near future.

One pet peeve warning about the NeHe tutorials:
The basic tutorial starts with an event message handler which renders in the idle loop.
This means all examples based on that will hog one core of your CPU while the OpenGL program is running!
This only makes sense for bechmarks and games. Nice applications should handle the rendering in the paint event and nowhere else.

Similar for all GLUT examples you find which set the display routine as idle func callback.
Burn, CPU, burn. :slight_smile:

Tell us, what do you know about 3D graphics? Are you new to 3DGraphics? Matrix, vectors? quaternions?, maybe calculus…

I use Linux Ubuntu but I’ve also worked with Fedora. Are you new to Linux? Which IDE do you use?.

Suggested packages:

  • Your vendor drivers(of course) or Mesa if your hardware is a bit old.
  • Qt
  • SDL
  • Blender
  • Eclipse(well, not the yum package, get the ‘Europa’ release )
  • g++ 4.1

Ditto on everything and especially the Red Book (my copy’s tattered unrecognizable). I’d like to get a copy of the Orange Book too but I’ve been roughing it with the spec (brrrrr). :wink:

New to 3D Graphics, but not that new. Took a DirectX 8 3D Gaming class in college (actually it was more of a DirectX 3D only class since we never got around to making games).
At the end of the course my demo included:

  • A 3D Scene with a skybox
  • A randomly generated mountain land scape with a rock terrain texture mapped over it.
  • A small building with a maze in it. Walls had a brick texture on them.
  • A 3D biplane (found a mesh file for this) flying around the mountain land scape in a circle.
  • Ability to use the mouse to move around the land scape.
  • A small lake. Used a water texture and some effects to make it seem like it was moving (basically moved the texture over it)

Thats about it.
As for calculus, I’m fine with that. I am also familiar with Matrix math, but ever since college courses, I haven’t run into any situations where I need to apply the knowledge learned there. So I’m rusty. I am aware that you can use matrices to perform various transformations on a 3D object.
I do remember mention of quaternions in the 3D class but they glossed over the topic and didn’t go in depth.

As for Linux, I am also new. Installed Fedora 8 about a month ago on my old Windows rig. However, I plan to get myself up to speed with OpenGL in XP first.