Right now I’m trying to freshen up what little I know of OpenGL ES 1.1 so I’m up to speed with OpenGL ES 2.0. I keep using the old ES 1.1 functions, so I thought I’d take the opportunity to re-learn OpenGL ES 2.0 from the ground up.
This OpenGL ES 2.0 Primer is helpful if you want to gain an understanding what’s different (and cool) about OpenGL ES 2.0 when compared to 1.1. It won’t teach you how to use OpenGL ES 2.0 though. The High-End 3D Graphics with OpenGL ES 2.0 PDF covers the concepts in greater detail, and quickly runs you through all important processes from initialization to compiling shaders to shutting down OpenGL ES 2.0. Again I didn’t learn how to program but it helped me understand the GL ES 2.0 concepts.
But what I really wanted was to learn how to do things with OpenGL in the context of cocos2d. Which means I just need to draw stuff, I don’t need to know how to load textures and setup the viewport and things like that. Nevertheless, Ray Wenderlich has done a great job explaining how to create a OpenGL ES 2.0 iPhone project from scratch. And Jeff LaMarche covered ES 2.0 shaders in great detail.
I preferred the to-the-point-ness of this OpenGL ES 2.0 tutorial series. Probably because it focuses more on how to do things with ES 2.0 that we used to know how to do in 1.1. Then there’s this 3-part tutorial with a great amount of detail but I found it hard to use it because it focused on individual functionality more than on putting things together. Or maybe it was just throwing too much stuff at me all at once.
Finally there’s of course the official OpenGL ES 2.0 Reference. If you need help to locate specific information on a function or enum I found the OpenGL ES 2.0 Reference Card particularly useful. You’ll want this printed out and always within reach.
And I simply wanted to draw a textured line … now what have I gotten myself into? I think one of the more confusing issues is that both 1.1 and 2.0 functions are available and compile in the same project, so it’s easy to accidentally use a 1.1 function instead of doing it the 2.0 way. And then things break or don’t work at all, other times it just happily works. As guidance for the simple (primitive) drawings you can use respectively learn from the code in CCDrawingPrimitives.m.
|Follow @gaminghorror||Follow @kobold2d|