Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing an engine that uses both OpenGL and OpenGL ES 2.0. I am well seasoned in OpenGL but not ES (although I am aware it is a subset of OpenGL). I could not find a set of differences that I should be aware of so that I can write code to take those differences into account and allow the engine to robustly handle the situation where a feature is not supported in OpenGL ES.

For example, the following forum post mentions a couple gotchas:

A link to an exhaustive list would be nice.

share|improve this question
Possible dupe?… – Tetrad Nov 8 '11 at 22:23
Well, although the question asks for differences, the answer does not really list them. I know the high-level difference between the two, but as an engine programmer, what do I need to be aware of when developing the rendering interface? – Samaursa Nov 8 '11 at 22:25
up vote 1 down vote accepted

I found it fairly helpful to look through the OpenGL ES 2.0 API. You might, for example, look at your current project / a project you've done recently and find all gl calls that you currently make, then see which of those are available in the OpenGL ES 2.0 API. If you're starting from scratch, I'd recommend writing to the OpenGL ES 2.0 API, as it is mostly a subset of OpenGL 2.1.

Writing shaders that support both OpenGL and OpenGL ES can be tricky as well. In the end, I had to use some #ifdef's to inject some statements into my shaders based on the current platform. I don't remember the details, and there may be ways to avoid what I did, but in the end I am able to use the same shader on multiple platforms.

The OpenGL ES 2.0 API Quick Reference Card is also helpful.

share|improve this answer
Now when you say "I'd recommend writing to the OpenGL ES API", what is the reasoning there? My initial plan was to write to OpenGL and 'turn off' the features of OpenGL ES 2.0. The engine is going to be used for several applications/games and not just one where the game needs to run on both OpenGL and ES (although in some applications/games that may be the case) – Samaursa Nov 11 '11 at 14:27
The idea is that if all your rendering routines are programmed using the OpenGL ES 2.0 API, they should work without modification using OpenGL 2.1. For example, use VBO's instead of immediate-mode drawing. – stephelton Nov 13 '11 at 7:46

OGLES 2.0 is like OpenGL 2.1. But there are many differences:

  • No glBegin/glEnd
  • No polygons, only triangles
  • GLSL 1.2 only
  • many unused options in blending or texture flags
  • ETC1 support mandatory on OGLES 2.0

You can use OpenGL ES 2.0 simulator on windows to try your code. ARM (Windows) or Imagination (Linux & Windows). On OS X, you can use iPhone simulator.

share|improve this answer
That is interesting. OpenGL ES simulator. I'll have to try that out, seems very useful (+1) – Samaursa Nov 11 '11 at 14:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.