Just ignore it if the parameter values are the same. If they are different 
then re-set your viewport.

If all you are doing is setting the viewport then just do it twice.  If you 
are doing anything else .... why?

On Thursday, April 12, 2012 4:57:35 PM UTC+1, Latimerius 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to