| SDL 2.0 OpenGL ES 1.1, NDK, home bt losing the draw screen |
|
Jared Maddox
Guest
|
Some platforms destroy the OpenGL context (or it's textures, or...) when the current window loses focus. I don't know that Android is one of these, but I think it might be, and I know that this specifically happens on some of the smart-phone OSes. The solution is to keep an eye out for certain events, and when they happen, set a flag so that the program will know to reinitialize part or all of it's OpenGL configuration the next time that it makes a render pass. As a result, I'd suggest starting on events, and just stick a note somewhere in the event loop to remind yourself of this later on. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
|
||||||||||||||
| onpause |
| SDL 2.0 OpenGL ES 1.1, NDK, home bt losing the draw screen |
|
Jared Maddox
Guest
|
I believe this is all buried in the mailing list archives. I'll try to look it up later, but I don't have time at the moment. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
|
||||||||||||||
| SDL 2.0 OpenGL ES 1.1, NDK, home bt losing the draw screen |
|
Jared Maddox
Guest
|
Not certain that I've found the right stuff, but I didn't want to leave this TOO long. It's mostly my hope that this will give you the references that you need to find the info you actually want. Firstly, make certain that you understand the "Pause / Resume behaviour" portion of README.android ... unfortunately, I don't know whether it's fully up to date. Why isn't anyone that currently compiles for Android chiming in on the events/needed actions? Next, a set of mailing list archive messages. Note that some iOS support is relevant here. I've basically tried to just grab all of the relevant conversations, instead of specific posts, so you'll want to browse a little. http://lists.libsdl.org/pipermail/sdl-libsdl.org/2012-April/084358.html http://lists.libsdl.org/pipermail/sdl-libsdl.org/2012-April/084369.html http://lists.libsdl.org/pipermail/sdl-libsdl.org/2012-April/084445.html http://lists.libsdl.org/pipermail/sdl-libsdl.org/2012-May/084743.html http://lists.libsdl.org/pipermail/sdl-libsdl.org/2012-June/084935.html http://lists.libsdl.org/pipermail/sdl-libsdl.org/2012-July/084998.html http://lists.libsdl.org/pipermail/sdl-libsdl.org/2012-August/085378.html http://lists.libsdl.org/pipermail/sdl-libsdl.org/2012-August/085380.html Finally, two forum posts: http://forums.libsdl.org/viewtopic.php?t=7926 http://forums.libsdl.org/viewtopic.php?t=7990&sid=85572573f88be2948c3f1b55be16e519 In all of that, I noticed that SDL2 is supposed to deal with this stuff itself, but that on some versions of Android that apparently doesn't actually work. Did you mention your Android version? Have you checked inside the Android files for SDL2 to see what Android-specific events and window messages are specified? What events are you actually getting leading up to, and following, an application pause? The more information you can provide, the more likely we are to figure out the problem. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
|
||||||||||||||||
| Hello |
|
Timodor
|
Hey Jared
Thanks for taking the time to look up that information for me. But you know what I finally fixed it all. I suspect I was using an old version of SDL 2.0 which id downloaded from internet (which was android eclipse project) before the on pause was fixed. Not only that assets now load from APK!!!, on pause works totally fine now. goes in and out. The game is still running, but still there must be some type of event issue to pause the game, if no events with in 5 seconds pause game or something. I downloaded latest SDL 2.0 Source today and complied them. I've come to the conclusion SDL 2.0 is the way to go for android. I literally jumped from SDL 1.2 to SDL 2.0 with like 5 lines of code, which was all the setting of the screen and OpenGL context. Everything else, events, mouse still using the old 1.2 commands :) If your using OpenGL moving from SDL 1.2 and SDL 2.0 is like 5 lines of code. Which is pretty amazing. I've had a good day today. I guess now I need to figure out how to dodual touch. I suspect maybe it's the right mouse button instead of the left? |
|||||||||||
|
|
||||||||||||
| SDL 2.0 OpenGL ES 1.1, NDK, home bt losing the draw screen |
|
gabomdq
|
I haven't because most of this stuff has already been discussed and is readily available via the forum search or Google.
It does work AFAIK. If it doesn't, that's a bug worth reporting! -- Gabriel. |
|||||||||||||||
|
|
||||||||||||||||

