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 started learning some Android development and one of the first things I thought I could make is a simple game. However, I'm faced with one difficult question right off the bat. Should I use OpenGL ES 1.0 or 2.0?

The game I have envisioned will be pretty simple graphically, utilizing 2D(tiled top-down type graphics) and fixed-camera isometric views. I've never used OpenGL in a desktop environment, so I'm oblivious on if shaders will be something I'll use, etc.

According to this page I should use OpenGL ES 2.0 generally for new development. My own phone however just recently(past year) got an update to get it to the required Android 2.2. (I don't even know if it has OpenGL ES 2.0 support)

So basically my question is, will I benefit from any of OpenGL ES 2.0's features over 1.0 and/or is it worth it in terms of compatibility?

share|improve this question

closed as off-topic by Josh Petrie Jan 9 '15 at 16:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

Or use an open-source graphics library to do most of the work for you: libgdx – ToolmakerSteve Sep 8 '14 at 22:52
up vote 7 down vote accepted

If you have no or little experience with OpenGL, I would not suggest 2.0.

With OpenGL ES 2.x, you will have to write your own routines for matrix manipulation and write your own shaders. This is a lot of work, a lot can go wrong, and debugging a lot of these things is very painful.

Only if you think you'll need some of the features that OpenGL ES 2.0 has should you use it.

Edit: If the above isn't enough to scare you away, I suggest you try to make a trivial example in OpenGL ES 1.x and then try to make that same example in OpenGL ES 2.x. You might, for example, draw a rotating cube with a texture applied to it.

share|improve this answer
First it was a 0, but -1 for the edit, especially the "scare away"-part which is just contraproductive. – Christian Rau Jan 25 '12 at 17:25
I'll start with the easier of the two then. I'm already going to be learning Android and brushing up on my Java as it is, so I'll take something easier to learn for now – Earlz Jan 25 '12 at 20:05
@ChristianRau - and yet "scare away" is exactly what 2.0's requirement to write shaders to do basic stuff did to me, when I encountered the spec. I am astounded that unless one falls back to 1.0 APIs, Android requires every programmer who implements GLSurfaceView.Renderer to deal with shaders, even if their requirements are simple. I expected to see something like Canvas class, but rewritten with a 3D focus, and great performance. I expected to use shaders eventually, but even for the most basic stuff?? (I will likely use libgdx, but was surprised wasn't some built-in solution.) – ToolmakerSteve Sep 8 '14 at 22:33
@ToolmakerSteve Well, if your requirements are simple, your shaders are, too. A simple shader pair that e.g. shows a fully transformed and lit and textured object doesn't need to take more than, say, about 10 lines of code for each the complete vertex and fragment shader. Shaders and matrix handling (for which there are plenty of ready to use libraries anyway) are really simple, it's not rocket science (but it isn't javascript either). As soon as you want to do more than rotate a cube (i.e. after the first day of GL) you don't want to avoid shaders anyway. – Christian Rau Sep 8 '14 at 23:00

Well it depends. I don't have any experience with ES, but the general question is always the same: Old and deprecated fixed-function versus a modern shader-centric approach.

Whereas stephelton is correct in that the old ES 1 API is easier to understand for beginners and it is easier to achieve simple things without understanding the whole API (and it prevents you from becoming one of those guys using shaders without understanding what they're doing), I nevertheless would advise you to start with the modern way of doing real-time graphics right away. Though you may not need the flexibility of shaders at first, it is extremely valueable once you managed the basics. And it is the way to do hardware-accelerated real-time graphics today (and tomorrow).

Whereas compatibility can be a concern (and I don't have an overview over the current stand of ES-devices), on the other hand if using desktop GL you wouldn't artificially limit yourself to GL 1.1 only features, just to support 15 to 20 year old graphics cards. Meaning, progress has to begin somewhere.

share|improve this answer
I strongly disagree with this. The amount of work required to get a trivial app running (perhaps a textured cube that rotates) with ES is exhaustive and there are so many things that can go wrong. Understand that in ES 2, you do not have any of the matrix functionality (push/pop, translate, rotate, scale ...) and you have to write all your shaders from scratch. If a person has never been exposed to these concepts, they are surely not going to get them right the first time. – stephelton Jan 25 '12 at 16:56
Unlike normal OpenGL, ( <= 3.0), these things aren't just deprecated, they don't exist. So you can't use them as crutches while you build around them; you have to build it all from the ground up. For a beginner, OpenGL ES 2.x would be like trying to build an office building from the ground up without knowing anything about architecture. – stephelton Jan 25 '12 at 16:59
@stephelton But you need to understand those things (matrix stuff) anyway. And removing it from OpenGL doesn't mislead you to think they are implemented in hardware anymore. Somebody has to implement the matrix stuff, and it's actually not really OpenGL's job to do this as it doesn't have anything to do with the graphics hardware. Get a library for it if you don't want to mess with it yet. Just use good learning resources and don't try to take on the world right from the start. Then starting with shader-only ES 2 should be no problem. – Christian Rau Jan 25 '12 at 17:16
@stephelton And well, graphics is not easy and using an old fixed-function approach to do transformation, lighting and texturing for you, only so that you don't need to understand what it really does, is no real alternative (and doesn't make it that much easier anyway). Once you do something more involved than a rotating cube (although that's what a beginner will surely do first), the additional overhead will vanish, moreover it will result in less overhead by enabling you to implement your ideas more straight-forward than somehow crunshing them into the fixed-function features. – Christian Rau Jan 25 '12 at 17:19
@ChristianRau, I think you're polarizing the two OpenGL versions a bit. He's not asking whether he should focus his career on one or the other; he's asking whether ES 2.x is appropriate and necessary for his simple game. While I agree that ES 2.x is certainly better than 1.x, and that learning 2.x is a good thing, I can't recommend that someone new to OpenGL start with ES 2.x. Learn to crawl before you walk. ES 2.x not only is far more involved (more learning, more work, more debugging...), but it will lock him out of a substantial portion of the Android market. – stephelton Jan 25 '12 at 17:34

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