OpenGL book recommendation?

Discussion in 'Mac Programming' started by Soulstorm, Jan 22, 2006.

  1. macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #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...!
     
  2. macrumors 6502a

    jalagl

    Joined:
    Jun 5, 2003
    Location:
    Costa Rica
    #2
    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.
     
  3. thread starter macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #3
    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...
     
  4. macrumors 68030

    superbovine

    Joined:
    Nov 7, 2003
    #4
    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.
     
  5. macrumors member

    Joined:
    Jan 22, 2005
    #5
  6. macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #6
    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.
     
  7. macrumors newbie

    Gruffalo

    Joined:
    Jan 27, 2006
    #7
    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
     
  8. thread starter macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #8
    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! :)
     
  9. macrumors member

    Joined:
    Mar 23, 2005
    #9
    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
     
  10. thread starter macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #10
    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??
     
  11. macrumors 65816

    Joined:
    Apr 19, 2004
    #11
    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.
     
  12. macrumors 6502a

    jalagl

    Joined:
    Jun 5, 2003
    Location:
    Costa Rica
    #12
    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.
     
  13. thread starter macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #13
    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.
     
  14. macrumors 65816

    Joined:
    Apr 19, 2004
    #14
    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.
     

Share This Page