I've written an app using a SurfaceView. It appears that one thing that is reducing the framerate of the app is that it takes a while to draw some bitmaps, and also that it takes some time to draw a few lines and circles using the canvas. I want to try and improve this by using a GLSurfaceView. Not so much because the slower framerate is a problem, but really because I just want to dabble a bit in OpenGL ES. Anyway, do to 2D drawing, should I got with OpenGL 1.0 or OpenGL 2.0? I would also like this app to work on as many devices as possible.
Asked
Active
Viewed 443 times
0
-
if you're only using 2d, then why not use canvas? http://developer.android.com/reference/android/graphics/Canvas.html – fazo May 17 '12 at 19:06
-
I've already written the app using canvas and a surfaceView. I'd like to try writing the same 2d app again, but instead with openGL. This is mostly an exercise in learning openGL, but I'm also curious if it will perform better than the surfaceView/canvas version of the app. That's why I'm wondering if going with gl2.0 instead of gl1.0 would be any better. Eventually I'll mess with 3d stuff, but I want to start by just rewriting this existing 2d app of mine. – Andi Jay May 17 '12 at 20:11
-
1i'm sorry, i didn't read your question carefully. As i remember you don't have shaders in opengl es 1, which means it would be easier as you don't need to learn writing them. in opengl es 2 (not 100% sure) you are required to write shaders. so i would go opengl es 1, but then you can extend it and do opengl es 2 version and add shader code. It's not that complicated, and with simple drawing you can just copy/paste it from different manuals/books – fazo May 18 '12 at 00:08
1 Answers
1
GLES 2 works on Android 2.2 and higher. If that supports all the devices you want I would go with GL2 as GL1 is simply going out the window more and more as time goes on. Fixed pipelines are NOT the way to go if your interested in graphics for the future. If you learn GLES2 you can carry your knowledge to more advanced things later.

zezba9000
- 3,247
- 1
- 29
- 51
-
I see, thanks. It looks like there is a bigger learning curve, but it sounds like it's more worth it given the way things are going. Thanks. – Andi Jay May 21 '12 at 15:43