On Tue, Mar 5, 2013 at 11:20 PM, a1 <[email protected]> wrote:

>
>
>
> I'm not quite sure about the rendering thread though - that's controlled
>> by GLSurfaceView and I'm afraid I can't just pause it with no other
>> side-effects.  I think the only way would be to
>> call GLSurfaceView.onPause() which however also means a lot of other
>> undesirable things including GL context loss and the subsequent need to
>> reload all geometry and textures.
>>
>
> Oh my god, really? We are in 2009 again or something? Since Android 3.0,
> you can call setPreserveEGLContextOnPause method to prevent GLSurfaceView
> from releasing context,
>

My minSdk is 7.  Preserving GL context is a hint.  You call it and pray it
works.  See the official docs at
http://developer.android.com/reference/android/opengl/GLSurfaceView.html#setPreserveEGLContextOnPause(boolean)



> if you are targeting older version simply back-port (or use one of
> existing back-ports eg. the one from Replica Island).
>

That's a solution with its own set of problems.  Check some of the comments
in the RI version.  In fact, I highly doubt it would work well across the
spectrum of today's Android hardware.

That being said multi-activity model is extremely unfit for games, I'm
> guessing that you are using some homebrew engine without  good UI toolkit
> hence you'd like to use PreferenceActivity - my advice is to adapt some
> existing widget toolkit (or part of it, if your game is in C++ there are
> bunch of options: cegui, gwen, librocket, twl, otk), as a stopgap you can
> simply show fullscreen dialog (Dialog class subclass) with preference like
> layout - that way your settings screen will not interfere with game
> activity lifecycle.
>

I agree it looks like it should be easy to make a Preference*Dialog*
instead of PreferenceActivity.  And yet, apparently it's not.

-- 
-- 
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