This question is part-technical, part-meta, part-subjective and very specific:

I'm an indie game dev working on android, and for the past 6 months I've struggled and finally succeeded in making my own 3D game app for android. So I thought I'd hop on SO and help out others struggling with android and openGL-ES

However, the vast majority of questions relate to extending GLSurfaceView. I made my whole app without extending GLSurfaceView (and it runs fine). I can't see any reason at all to extend GLSurfaceView for the majority of questions I come across.

Worse, the android documentation implies that you ought to, but gives no detailed explaination of why or what the pros/cons are vs not extending and doing everything through implementing your own GLSurfaceView.Renderer as I did

Still, the sheer volume of questions where the problem is purely to do with extending GLSurfaceView is making me wonder whether actually there is some really good reason for doing it that way vs the way I've been doing it (and suggesting in my answers to others to do).

So, is there something I'm missing? Should I stop answering questions in the meantime?

Android openGL documentation

link|improve this question
nice question i am keen about answer.. – TofeeqAhmad Dec 22 '11 at 11:20
One reason as to why extend GLSurfaceView can be found here: gamedev.stackexchange.com/questions/12629/… Without realising it, I actually already sidestepped the issues talked about in this question in my own app by reloading textures etc onResume() – Spoon Thumb Dec 23 '11 at 23:38
feedback

1 Answer

Well...GLSurfaceView is, as I am sure you've noticed, just a wrapper for common good. It encapsulates all the functionality one would need to render with opengl, having the option to incorporate it nicely with the android View hierarchy.

You did not provide your alternative so it is impossible to compare, but I hope you spawned another thread for rendering as GLSurfaceView does, or your user input might lag.

So again: GLSurfaceView provides a new thread for rendering, so you dont have to worry about user input lag

link|improve this answer
Yes, but GLSurfaceView does that (starts a rendering thread) even if you don't extend it. I use GLSurfaceView, but I don't extend it. I'm asking what benefits are there from extending it and overrriding the different methods therein as opposed to just having everything in the Renderer – Spoon Thumb Jan 3 at 12:05
welp, I tried :) I might look into it later, now I am also interested! – Greg Jan 4 at 16:15
feedback

Your Answer

 
or
required, but never shown

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