1

I am fairly new to Android development as well as Java and i am looking to create an app activity that behaves much like google sky map. I want to essentially have a custom camera view, which i have already set up and have working and am then thinking i want to put a transparent surfaceview on top of that camera view which i can draw 2D image files to. Using the SENSOR_ORIENTATION I will want that transparent surfaceView overlay to move around. I am assuming that I will want to use a GLsurfaceview for this assuming that i will be able to draw the images to that view and just change the GLcamera view point on the sensor change.

Not knowing much about GL for android I am asking if this is the right approach before i burry myself in Android OpenGL. In that i noticed on the developer.android resources that there are two types of OpenGL for android ES 1 and ES 2. Is one better than the other for this?

Erik

1
  • There's no such thing as Android ES anything. There are OpenGL ES 1.1, and OpenGL ES 2.0 (and apparently 3.0 coming semi-soonish). Anything that Android adds are just OpenGL ES extensions. Commented Feb 17, 2012 at 0:26

1 Answer 1

2

You should use OpenGL ES 2 for android. ES 1 is more of a FF ( fixed function ) only version of GL where you don't have access to shaders or other more interesting and niche features that you would most likely want. With ES 2 it's the complete opposite, there is no fixed function pipeline, and instead everything is vertex and fragment shaders. The benefit of this is it's more modern, and you have a programmable pipeline to work with. I'm fairly certian some (newer) android devices don't support ES 1 at all. Or if they do it's emulated by ES 2, which is a lot slower. Unlike desktop PCs where you can mix GL version code at your own peril, with android you cannot. If you choose ES 1, you can't use ES 2, if you choose ES 2 you can't choose ES 1. I'd suggest you use ES 2, it's not terribly hard. If you're coming from a background of writing FF code you'll find the concept of PP ( programmable pipeline ) realy odd and redundant.

Sign up to request clarification or add additional context in comments.

1 Comment

Im coming from actionScript 3.0 so yeah i find java a bit od but im getting used to it bit by bit.. thanks though, your answer is really helpful..

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.