Which book to buy??

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

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.

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.

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.

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.

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.

http://fly.cc.fer.hr/~unreal/theredbook/

is that what i need? the red book?

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.

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?

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. You could download binaries of FreeGLUT. Or you could download my SDK and build it, since it includes FreeGLUT. Even the download that comes with my tutorials has it built in; just run the build as it explains and you’ll be fine.

All of these things run on Windows.

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

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.

There is the FAQ on the wiki. It should answer exactly these types of questions; and if it doesn’t, it should be updated.

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?

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.

I think superbible is good too… Just my 5 cents…

I have this one:

http://www.amazon.com/OpenGL-SuperBible-…3420&sr=1-1

Best book to start.