PDA

View Full Version : Newbie ...would like guidance



Apex77
10-11-2007, 07:34 PM
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

Lindley
10-11-2007, 08:08 PM
The Red Book.

http://www.opengl.org/documentation/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.

sqrt[-1]
10-11-2007, 09:04 PM
I would personally work through the NeHe tutorials:

http://nehe.gamedev.net/lesson.asp?index=01

(The red book is good also)

ZbuffeR
10-12-2007, 12:09 AM
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")

k_szczech
10-12-2007, 05:13 AM
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.

ToddAtWSU
10-12-2007, 07:33 AM
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!

Apex77
10-12-2007, 07:48 AM
Originally posted by sqrt[-1]:
I would personally work through the NeHe tutorials:

http://nehe.gamedev.net/lesson.asp?index=01

(The red book is good also) Cool.

I see he doesn't give a "Linux Setup".
I assume I can find that info elsewhere.

Lindley
10-12-2007, 07:56 AM
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.

sqrt[-1]
10-13-2007, 05:57 AM
All the examples have linux versions. Just go to the tutorial and scroll to the bottom for all the versions.

Eg. Window setup:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01

RGHP
10-15-2007, 05:11 PM
Any specific problem setting up Linux? which distro do you use?

Jan
10-16-2007, 10:00 AM
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.
Jan.

Apex77
10-20-2007, 09:42 AM
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.

Relic
10-21-2007, 10:10 AM
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. :)

RGHP
10-22-2007, 01:21 PM
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

plasmonster
10-27-2007, 05:14 AM
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). ;)

Apex77
01-09-2008, 06:38 PM
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

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.