Okay, if nobody has an answer or explanation, I will hope that moving non-idempotent code out of onSurfaceChanged() and ignoring the first onDrawFrame() is enough to work around this bug.
On Thu, Apr 12, 2012 at 5:57 PM, Latimerius <[email protected]> wrote: > Hello, > > googling for the following problem got me a lot of hits where people > ask or rant about this but no actual explanation so I figured I'll ask > here, perhaps someone has an update on the problem. > > I'm using stock GLSurfaceView, only subclassed to get onTouchEvent(), > the rest of it is standard. When coming back to my app (*not* > starting it anew, that seems to work as expected) I get the following > sequence of calls: > > onSurfaceCreated() > onSurfaceChanged() > onDrawFrame() > onSurfaceChanged() > onDrawFrame() > onDrawFrame() > onDrawFrame() > ... > > The (by now standard ;-)) question is: why is onSurfaceChanged() > called twice? The calls are identical as far as the callee can tell, > the GL10 argument refers to the same GL10 instance, the width & height > are the same, too. > > The other question (might have been asked before, too, I haven't come > across that if so) is: the single onDrawFrame() call which occurs > between both onSurfaceChanged() calls is strange because whatever gets > drawn during that call (might be just a simple glClear(), or a full > scene render, doesn't matter) never seems to make it to the screen, > never becomes visible. Why is that? > > I'm trying to figure out whether it's safe to ignore the issue or hack > around it, and to decide that it'd be very helpful to understand the > causes. > > Thanks in advance! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

