Author Topic: Looking for a good OpenGL book  (Read 5308 times)

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Looking for a good OpenGL book
« on: 2010-11-23, 08:48:05 AM »
Hi guys!

I was wondering, since SGDK went from DirectX to OpenGL, bluemonkmn and some others must have a good knowledge of OpenGL.  I'm interested in learning OpenGL and I'm thinking about getting a good OpenGL book oriented for game programming or programming in general.  It doesn't have to be something like OpenGL for dummies, since I'm already a developper, but I would like it to be a learning and reference book rather than just a reference book. 

Do you have any suggestions? 

thanks! :)
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Looking for a good OpenGL book
« Reply #1 on: 2010-11-23, 05:59:02 PM »
Have you considered downloading the OpenTK source code and samples (OpenTK is the OpenGL wrapper than SGDK2 uses)?  They have kind of an online "book" documenting OpenTK: http://www.opentk.com/doc

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Looking for a good OpenGL book
« Reply #2 on: 2010-11-23, 07:53:25 PM »
Well, I was considering to make a project in Java-OpenGL.  I have never done any Java and I think it's a hole in my resume.  I' m looking for a new job and sometimes, it comes up that I don't have any Java experience, so making a little project with OpenGL (for fun) and Java (for experience) seems like a good idea to get my hands in Java.

I made some research and I was thinking about using Netbeans as my Java IDE and maybe Java Lightweight Game Library (LWJGL) to use OpenGL.  Ideally, I don't want to rely on a wrapper too much, I want to learn how it works under the hood so I can tweak it if need be.  Looking directly at the source code of a wrapper seems like a lot at first...

Did you directly used OpenTK with the OpenTK manual without having further knowledge of OpenGL?

Thanks!
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Looking for a good OpenGL book
« Reply #3 on: 2010-11-24, 06:39:27 AM »
Wow, I didn't know you could use OpenGL from Java, but I guess it makes sense.

I knew nothing of OpenGL when I started (seems like a bad plan :) ).  But I used the OpenTK forums and sample code for some questions, and most of the real learning came from searching Google for OpenGL functions like "glTexParameter" and "glBlendFunc".  Almost every OpenTK wrapper function for OpenGL is accessed like "GL.TexParameter" and "GL.BlendFunc" and has an equivalent OpenGL function without the dot.  So I could find the OpenGL documentation by googling the function without the dot (or with the "gl" prefix added, depending on how you look at it).

It turns out that OpenTK is a very thin wrapper when it comes to OpenGL, so the OpenGL documentation pretty much exactly describes how to use OpenTK.  OpenTK is mostly to make OpenGL accessible to C#.

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Looking for a good OpenGL book
« Reply #4 on: 2010-11-24, 08:36:32 AM »
I'm impressed!  Going from DirectX to OpenGL without any prior knowledge of OpenGL that's a big challenge.  :o

Allright then, I'll look elsewhere for an OpenGL book.  :)

Thanks! :)
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Looking for a good OpenGL book
« Reply #5 on: 2010-11-24, 01:46:42 PM »
Actually SGDK2 had very limited use of OpenGL.  All it needs to do is copy rectangles of graphics to the screen.  Notice how few functions there are in Display.cs.  SetColor, Scissor, DrawText, DrawFrame, DrawRectangle and FillRectangle are about the only functions used by a game at runtime.  And DrawText only calls DrawFrame -- no direct calls to OpenTK/OpenGL.  Because there were so few unique things that SGDK2 needs to do in OpenGL, the transition wasn't too complicated.

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Looking for a good OpenGL book
« Reply #6 on: 2010-11-24, 08:42:13 PM »
I went through display.cs.  I'm surprised to see so little different OpenGL instructions.  Wow!  I thought it would need much more than that.
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com