PDA

View Full Version : Which book to buy??



programmer17
01-19-2012, 09:40 AM
Hello. I have been using glut for a while and would like to get to OpenGL 3.1. Which book?? OpenGL primer third was my choice but it might focus on glut or 2.1. I am a absolute beginner. Please help

Alfonse Reinheart
01-19-2012, 11:24 AM
Why 3.1 specifically? What's wrong with 3.3?

In any case, the popular choice is the OpenGL Superbible, fifth edition. Personally, I think it has some flaws to it. Of course, I'm currently writing an alternative that you can read in my signature. Which is free.

So you might be able to save some money for the time being.

programmer17
01-19-2012, 12:04 PM
that one uses glut.
I have read the first few chapters on vectors and what opengl is. Very nice book.

Yes anything more than 3 is fine.

Alfonse Reinheart
01-19-2012, 02:55 PM
What is it about GLUT that bothers people? If you're trying to learn how to use OpenGL, learning how to create HWNDs/X-Windows windows/etc is not helping. Learning how to process window messages and get basic input is not helping to learn OpenGL. It'd be like prefacing a book on OpenGL with "here's how to program in C++!"

GLUT is used here to abstract away the non-OpenGL parts, so that the text can focus on, you know, OpenGL. The whole point of the book. Cross-platform bits only get in the way.

Kopelrativ
01-19-2012, 03:14 PM
I also recommend the Superbible. You will thoroughly get the opportunity to understand the OpenGL3+ way to do it.

You can see here and there that it was originally based on the immediate mode, and then adapted for the shader technology. For example, you won't see much about shaders until the advanced chapters. I think this is a small problem, I learnt a lot reading the book.

programmer17
01-19-2012, 04:35 PM
I know glut. I dont need to learn it twice.

mhagain
01-19-2012, 05:04 PM
I know glut. I dont need to learn it twice.
Then I'd suggest that, rather than trying to learn two new things at once (and not being certain of which one of them you screwed up if you have problems) that you learn how to use the version of OpenGL you currently know with your platform-native code of choice. Once you have that you can move on to GL 3+.

You'll likely find however that the windowing system code is really quite tiny compared to the actual GL code, and that GL code you might write with GLUT is no different to GL code you'll write with native windowing stuff.

programmer17
01-19-2012, 05:44 PM
http://fly.cc.fer.hr/~unreal/theredbook/

is that what i need? the red book?

Alfonse Reinheart
01-19-2012, 06:25 PM
I know glut. I dont need to learn it twice.

That doesn't even begin to make sense. You already know C and/or C++ too; are you "learning it twice" by simply using it to learn OpenGL? Shouldn't you therefore be wanting to use Java, C#, or Python (whichever ones you don't know) to learn OpenGL?

GLUT is a tool. When you know a tool, you use it to learn other tools. That's what tools are for.

The best way to learn something is to focus on learning that particular something. That's why my book specifically says, "But this is not a book for beginning programmers." It doesn't teach programming in C++; it doesn't teach how to open OpenGL windows on Win32, Linux, or MacOSX. It teaches OpenGL. It uses whatever tools are available to cut out all of the grunt-work it takes to get to the OpenGL part.


is that what i need? the red book?

If you're dead set on learning how to create an OpenGL window and context, that won't help you. The online RedBook is just GL 1.1, so it's also not going to help you. The current version 7 of the RedBook covers 3.1, but it's not exactly the most well-organized teaching tool.

programmer17
01-19-2012, 09:16 PM
Ok. I understand.
So, lets go to the conclusion:
1) I am good with all the c++ basic concepts.
2) I used glut for a few month and want to go to something new, more challenging, more powerful and more useful.
3) So, you say I go for your book?
thanks.
could you tell me how to run opengl on win32 and glut together?

Alfonse Reinheart
01-20-2012, 01:37 AM
could you tell me how to run opengl on win32 and glut together?

What exactly do you mean by that? FreeGLUT runs just fine on Win32. You can download FreeGLUT and build it yourself (http://sourceforge.net/projects/freeglut/files/freeglut/2.8.0/). You could download binaries of FreeGLUT (http://www.transmissionzero.co.uk/software/freeglut-devel/). Or you could download my SDK (http://glsdk.sourceforge.net/docs/html/index.html) and build it, since it includes FreeGLUT. Even the download that comes with my tutorials (https://bitbucket.org/alfonse/gltut/downloads) has it built in; just run the build as it explains (http://www.arcsynthesis.org/gltut/Building%20the%20Tutorials.html) and you'll be fine.

All of these things run on Windows.

thokra
01-20-2012, 04:41 AM
could you tell me how to run opengl on win32 and glut together?

This looks like the typical 'misunderstanding what OpenGL is' question.

To be clear: GLUT is a windowing toolkit using the platform specific API of the platform specific window manager. What's important for using OpenGL functions from GLUT's perspective is setting up an appropriate GL context and make it current before issuing any GL commands. Still, that's the window manager specific part - e.g. WGL on Windows and GLX on any UNIX derived OS using X11. Nothing else. GLUT comes a few functions using OpenGL functions in turn but basically GLUT has nothing to do with OpenGL per sť.

OpenGL, until being implemented by a hardware vendor (i.e. AMD, NVIDIA, Intel etc.), is nothing more than a specification - a piece of paper if you will. And even when being implemented it becomes



[..]just a layer that sits between your program and your hardware: "a software interface to graphics hardware" as page 1, line 1 of just about any OpenGL material says.

Since hardware vendors implement the specification, OpenGL is part of the graphics card drivers.

Is there a Wiki article about this basic stuff? A question of this sort is asked regularly so we should redirect to it.

Kopelrativ
01-20-2012, 04:53 AM
Is there a Wiki article about this basic stuff? A question of this sort is asked regularly so we should redirect to it.
There is the FAQ on the wiki (http://www.opengl.org/wiki/FAQ). It should answer exactly these types of questions; and if it doesn't, it should be updated.

programmer17
01-20-2012, 07:24 PM
what I mean is...
when i create a new project I can either create a glut or opengl project.
All the funtions dont work on either or them.
therefore, how to use both ways together?

Alfonse Reinheart
01-20-2012, 07:57 PM
I can either create a glut or opengl project.

I'll try this once more:

A GLUT APPLICATION IS AN OPENGL APPLICATION! What part of that do you not understand?

FreeGLUT is a library. The purpose of the library is to initialize an OpenGL-renderable window and do basic window management for it. You can use FreeGLUT to work with OpenGL. It isn't required to do so, but when starting out, it is very useful.


All the funtions dont work on either or them.

... what are you talking about? FreeGLUT is a library. OpenGL is a library (for these purposes). OpenGL functions are not FreeGLUT functions. They're separate but related libraries. Functions for one aren't supposed to work on the other.

You have some very serious misconceptions about basic concepts at play here.

newsb
01-21-2012, 05:30 PM
I think superbible is good too... Just my 5 cents...

Narann
01-24-2012, 06:57 AM
I have this one:

http://www.amazon.com/OpenGL-SuperBible-...3420&sr=1-1 (http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617/ref=sr_1_1?s=books&ie=UTF8&qid=1327413420&sr=1-1)

Best book to start.