Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
I have bought "OpenGL Superbible, Third Edition" but it seems that I have made the wrong choice since mac support is limited in this book. Many things are changed, and even the most basic program needs changes to be done.

What are your opinions about this book? (if you know it of cource)

Have you got any recommendations about books I sjould read to learn how to program in OpenGL?

Note that I am a complete newbie in OpenGL and I intend to program using C++ and OpenGL in OS X.

Links to good tutorials on the internet are welcome, too...!
 

jalagl

macrumors 6502a
Jun 5, 2003
802
1
Costa Rica
The "Red Book"

You should check out the OpenGL Programming Guide, also known as the "Red Book". It is OS-neutral, and an excellent source of documentation. It is published by the OpenGL Architecture Review Board.

I would also recommend that you develop your first demos in C.
 

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
jalagl said:
You should check out the OpenGL Programming Guide, also known as the "Red Book". It is OS-neutral, and an excellent source of documentation. It is published by the OpenGL Architecture Review Board.

I would also recommend that you develop your first demos in C.
Is this book for beginners?

Also, why should I start developing in C instead of C++? Is it because C++ is too complicated? Well, that's the only language I know, since in our university it's the only language they teach us...
 

superbovine

macrumors 68030
Nov 7, 2003
2,872
0
Soulstorm said:
Is this book for beginners?

Also, why should I start developing in C instead of C++? Is it because C++ is too complicated? Well, that's the only language I know, since in our university it's the only language they teach us...

This is book is probably the most important book to get if you are doing opengl, even other books and examples online will reference this book.

I have ver 1.2 of the redbook which is a bit old, but all the examples are in C. You can do everything in C++ just some of the stuff in there will have be static, just the method calls will have to be static. I hard time figuring this out at the beginning. You should be able to google to see the redbook examples done in c++. It isn't that much different.

edit: I forgot to mention that knowledge of Linear Algebra will make you life a little easier.
 

ChrisA

macrumors G5
Jan 5, 2006
12,904
2,145
Redondo Beach, California
Soulstorm said:
Is this book for beginners?

Also, why should I start developing in C instead of C++? Is it because C++ is too complicated? Well, that's the only language I know, since in our university it's the only language they teach us...

FIrst I have a question: I have not "done OpenGL" since the time when I had an SGI workstation on my desk. Do people doing graphics on a Mac typically program at the OpenGL level. I used to work with the "Inventor" library. There is now "Open Inventor". Is this used or even available on OSX?

OK back to this thread...

It's THE standard refference work. I can't imagine working without the full self load of the "Arctitecture Group" books.

Why "C". IMO it's your choise and could go eaither way but there are good reasons. One is that C++ libraries don't have deterministic timming, not a good thing if "real time" matters. and you do know C. C is a subset if C++.

Ithink the university is doing t's students a serious disservice if they teach only one programming language. No matter which single language it is just using one is not good. Students should have exposure to several different classes of languages.
 

Gruffalo

macrumors newbie
Jan 27, 2006
13
0
Soulstorm said:
Is this book for beginners?

Also, why should I start developing in C instead of C++? Is it because C++ is too complicated? Well, that's the only language I know, since in our university it's the only language they teach us...

Another vote for the "Red Book". It doesn't cover the new stuff but it is the only text you will need to get started. The examples in the GLUT toolkit are pretty useful.

Personally, I find it incredible that any place starts teaching C++ without a requirement for at least a working knowledge of 'C' but then I'm not a 'CS' grad. I'd also recommend you purchase a copy of "The 'C' programming language" by Kernighan & Ritchie while you are at it.

-Michael
 

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
ChrisA said:
FIrst I have a question: I have not "done OpenGL" since the time when I had an SGI workstation on my desk. Do people doing graphics on a Mac typically program at the OpenGL level. I used to work with the "Inventor" library. There is now "Open Inventor". Is this used or even available on OSX?

OK back to this thread...

It's THE standard refference work. I can't imagine working without the full self load of the "Arctitecture Group" books.

Why "C". IMO it's your choise and could go eaither way but there are good reasons. One is that C++ libraries don't have deterministic timming, not a good thing if "real time" matters. and you do know C. C is a subset if C++.

Ithink the university is doing t's students a serious disservice if they teach only one programming language. No matter which single language it is just using one is not good. Students should have exposure to several different classes of languages.
Well, my my proffession is not a programmer. I am at the Automation deoartment in athens. Among other things, (electrology, physics, mathematics) there is also programming. However, I really like programming and I really want to get seriously involved with it.

I am interested in developping applications for the OS X and Linux (I will move to Linux once I learn to program to OS X, which isn't going to happend anywhere soon). I am interested in graphic applications and games. However, I am also starting to learn using Carbon in OS X.

That way I will learn as I go. Every thing I learn in OpenGL and C++ I will implement them to carbon applications so that someday I will make something really useful... That's my plan. It's not going to be realised anytime soon, but at least I have one and that's a good start! :)
 

billy_d_goat

macrumors member
Mar 23, 2005
46
0
I have used the OpenGL Superbible and found it to be a good book. The work that I do is actually designed to be cross-platform, hence why we use OpenGL. Short of the differences in getting the OpenGL environment running in a .NET vs Cocoa platform, OpenGL should be OpenGL. I'd suggest going into the ADC section of Apple's site to learn the basics of working with NSOpenGLView and such. Once you have that down, you should be able to use the Superbible. Granted, there are certain extensions available on the Mac that are not available in Windows. In my opinion, the book you have is one of the best resources for OpenGL programming...keep it! :D
 

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
Just bought OpenGL Programming Guide, fifth edition. Also known as "Red Book". Well, I can say that once you know the setup for OS X, it is a little gem. OpenGL Superbible is good, but I found Red Book to be more suitable to my needs, and gives better explanations of how things happen in OpenGL.

Its sample code is good too!

One problem though. I wish it had a CD with the sample code inside it.... I went to their website and just saw sample code for different implementations of OpenGL. Do these things work for OS X anyway??
 

psingh01

macrumors 68000
Apr 19, 2004
1,586
627
I do opengl programming on Windows using several open source frameworks. But sometimes I'll just workout some proof of concept apps on my powerbook with OpenGL and GLUT. I have both the superbible and an older version of the redbook. I think they are both good books, but I use them mainly as references. The best tutorials are the nehe tutorials linked to in a previous post in this thread. They can get you into what you want to learn quickly and provide the src for various platforms.
 

jalagl

macrumors 6502a
Jun 5, 2003
802
1
Costa Rica
Soulstorm said:
Is this book for beginners?

Also, why should I start developing in C instead of C++? Is it because C++ is too complicated? Well, that's the only language I know, since in our university it's the only language they teach us...

I'm not sure if the book is for beginners, but it is the definitive bible if you want to learn OpenGL.

Also, OpenGL works as a state machine, so you wouldn't gain much by using OOP.
 

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
psingh01 said:
I do opengl programming on Windows using several open source frameworks. But sometimes I'll just workout some proof of concept apps on my powerbook with OpenGL and GLUT. I have both the superbible and an older version of the redbook. I think they are both good books, but I use them mainly as references. The best tutorials are the nehe tutorials linked to in a previous post in this thread. They can get you into what you want to learn quickly and provide the src for various platforms.
Actually, I can't understand what those tutorials are saying. Their code just doesn't work. It compiles fine, but the application is exiting with an error, without displaying anything.
 

psingh01

macrumors 68000
Apr 19, 2004
1,586
627
what kind of error are you getting? which tutorials are you having trouble with?

I haven't tried the tutorials in a while, but some of my old (very simple) programs were compiling but also not running properly. There was some change in Xcode which made my old project files not work (mainly the libc++.a library doesn't seem to exist anymore?? or renamed?). It maybe that they haven't updated the project files to the new xcode format. Xcode is supposed to automatically upgrade to the new format but I found it easier to just create a new project from scratch and it worked fine.

Also i would like to mention another book that I have. It is called "Interactive Computer Graphics" by Edward Angel http://www.cs.unm.edu/~angel/. I used this as a text book in my first (and only) computer graphics class. It is not really an opengl book or mac book, more a fundamentals of computer graphics book. But the code examples are in opengl so it maybe a good place to start. I rarely use this book now, but I do think it was helpful when I started. You should browse through it at a bookstore before buying though.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.