Search code examples
opengl-es-2.0opengl-es-1.1

Are main principles different in OpenGL ES 1.1 and 2.0?


As many others I've been in a crazy search for a good OpenGL ES 2.0 tutorial. But I seem to have tasted any available but I'm still not confident. I know that 1.1 has a fixed pipeline whereas 2.0 leaves everything upon the programmer's taste. So I thought I might learn lights, textures and stuff from 1.1 tutorials and then after learning those concepts I can do all the stuff that's not provided as ready functions manually using shaders. DO you think I'm on a right way or should I stop?


Solution

  • Your question is a little more subjective, so my answer will necessarily contain personal opinions, but I believe that it is no longer useful to start learning OpenGL ES with 1.1 and that people should start with 2.0. On iOS, the number of active devices in the field that can't handle 2.0 is estimated to be somewhere less than 5% (based on sales, the highest this number could possibly be is 16%). I can't speak to Android statistics, because I've had a harder time pinning down numbers there due to the diversity of available hardware, but that also appears to be very much in 2.0's favor.

    When it comes to the technical side of things, I don't think there is much to be gained by learning 1.1 first, because you'll end up tossing a lot of that out the window when moving to 2.0. There isn't much of a point in learning the specific API calls to set up lights and material properties in 1.1 when you'll have to create your own shader programs to do this in 2.0. You don't really gain any insight into how these lights, etc. work in the fixed function pipeline of 1.1, because that just acts like a black box. When it came time for me to move to 2.0, I found that I didn't really understand what had been calculated for me in 1.1, so I didn't gain much from experience with the older API.

    The things that are the same between the two can be learned just as well from starting with 2.0.

    One large advantage that 1.1 has over 2.0 is the availability of sample code and tutorial material. However, that's getting better over time as people migrate to the new API, and I describe some of the best material I've found on the topic (with an emphasis on iOS) in this answer. As I indicate there, I taught classes on both 1.1 and 2.0 that can be found for free on iTunes U. The course notes for that link to several simple 2.0 examples I assembled to demonstrate how to replicate 1.1 capabilities. I also talk about how to transition some 1.1 code to 2.0 in this answer (the PowerVR reference I link to there is particularly good for showing how 1.1 effects can be generated in 2.0 shaders).

    Personally, I feel much more at home with OpenGL ES 2.0 than I ever did with 1.1, in large part because I feel the 2.0 API is much simpler. I don't have to remember all of the commands to set up my scene in just the right way, and what I can and cannot do with the API. I just write simple GLSL code to do what I want.