I am aware of the that...but the OP was saying that his app was
crashing on eglSwapBuffers(), and in my experience, that can happen
when the app sets the destroyRequested flag to request destruction,
and you don't destroy your app.
On Oct 13, 9:47 am, Ratamovic <ratamo...@gmail.com> wrote:
As far as I know you need to
> return from android_main() only when the flag destroyRequested is set.
>
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Im also struggling with the 'home' button. When I bring my app back into focus I get a black window :(
I see it destroying/creating window/surface/context
Not sure where to look
(another Nick :)
I would encourage you to use Ratamovic's suggestion and just put the
rendering in the main thread. I think you are causing yourself a lot
of headaches for nothing. Threading is better suited for blocking or
long running tasks, like path-finding, planning that may takes several
frames to complete, or continuously playing a song in the background
that won't likely be interrupted until it has finished playing. When
threading, it's usually best to stay away from "Race Conditions"
completely. Trying to offload the rendering of a constantly changing
environment to a separate thread is usually a good way of creating
one. Such a thing would make more sense when decoding video, as the
content is not constantly changing. When two threads are constantly
racing along head to head, keeping them in sync is usually much more
trouble then it's worth, and you would probably be better off just
dealing with the limitations of your device.
@Nicholas
When you push the home button, all of your graphics memory is
destroyed automatically by the operating system. This means that the
next time your app is shown to the user, you will have to completely
reinitialize everything, including the opengl context, all textures,
all shaders, all vertex buffers, all frame buffers, ect. If you have
done that without errors, and are still getting a black screen, your
app could be freezing at eglSwapBuffers, as described in my first
post, because you have not properly responded to the operating
system's request to destroy the previous instance of your app.
On Oct 17, 5:08 am, Ratamovic <ratamo...@gmail.com> wrote:
> An interesting document on the subject:http://developer.download.nvidia.com/assets/mobile/files/AndroidLifec...