Tuesday, June 30, 2009

OpenGL

Rotating cube
I finally got around to learning OpenGL in earnest. My two resources are The Red Book (old online version) and NeHe's OpenGL Tutorials. I started looking at OpenGL stuff several months ago but got caught up in school and things.

If you take a look at NeHe's guide, don't be scared away by the first tutorial, which is more of a Windows lesson than an OpenGL lesson. The subsequent lessons are shorter and more pertinent to OpenGL.

I'm reading through The Red Book right now. Since it seems more organized than NeHe, I want to use it to get the concepts down before doing NeHe's tutorials. I'm on chapter 3, dealing with the modelview and projection matrices. I decided to take a diversion halfway through the chapter and write some small functions involving changing the view based on polar coordinates. It took awhile to get it right, despite the book itself being written well enough to grasp the concepts fairly quickly. Here I remind myself of the first rule of a CS degree: Never stop coding. And going through these tutorials I recognize the importance of thinking on my own and writing code aside from what's given in the tutorial. Otherwise a lot of time would be wasted later, when I'd have to go back and reread things more closely.

Probably what made me go back to learning OpenGL was knowing that I could do some OpenGL stuff on Android. Android uses a special version of the OpenGL API called OpenGL ES, catered toward embedded systems. I also know that the Wii and Nintendo DS homebrew libraries have OpenGL-like graphics APIs. In fact tons of platforms use similar APIs, so it's definitely worth learning.

No comments:

Post a Comment