Different versions of OpenGL es?

So I am a bit confused! I just found out opengl es 3.0 was a thing and a ton of questions flowed into my mind... if you have any thoughts let me know.


  1. What devices support opengl es 3.0?
  2. Can/How do you mix opengl es 2.0, and 3.0 code into the same project?
  3. If you call glLineWidth() does it actually work as apposed to 2.0's ignorance of that command?
  4. Is anti-aliasing of simple geometry native?

I just make a 3.0 context, if that fails with nil then fall back to a 2.0 context. For instance, iPad 2 will fail the 3 context and make the 2 context. This way you will not need to check on a device by device basis.


OpenGL ES 3 is super set of 2. Migrating code is much easier. Mainly just name changes of functions and enumeration constants.


I swapped my 2.0 code with the version 3 headers. I then saw the compiler errors and fixed them. After that for compatibility, the context has a property called API which you can check for 2 or 3 to make appropriate calls if there is enough of a major difference. So, I could check for API and use the old code if necessary -- compare with git for instance. All the shader code from ES 2 is compatible with ES 3. Much easier transition than from OpenGL ES 1 to 2.


Hopefully, we get the older devices to drop out on iOS 10. Like the 5C and iPad 2 -- the performance difference is so great its difficult to program for the scope of devices.


Hope that helps.


btw, here is a useful link per Apple:


https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/AdoptingOpenGLES3/AdoptingOpenGLES3.html

Different versions of OpenGL es?
 
 
Q