The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.
SDL
Simple Directmedia Layer Forums
SDL 2.0 OpenGL ES 1.1, NDK, home bt losing the draw screen
Timodor
Joined: 14 Apr 2013
Posts: 72
Location: Australia
Posted: Thu May 09, 2013 2:19 am
Hey Dudes,
I've now decided to move onto SDL 2.0 and scrapping SDL 1.2 because of On-pause Issues and Asset-Management issues.
Since I'm doing everything in OpenGL, all I need to do is get and set the resolution and do the events, which shouldn't be much work.
I'm hoping at the end of this assets are working fine and onPause works perfectly. Which would mean I would have 100% working base to develop.
I just got my first OPENGL window to draw on SDL 2.0!
// NEEDED TO DRAW OPENGL
SDL_GLContext glcontext = SDL_GL_CreateContext(win);
//LIKE THE OLD SWAP BUUFERS FUNCTION
SDL_GL_SwapWindow(win);
It's drawing! Which is good.
But when I press the home button on the phone Android 4.0 and then go back to it, the screen is lost. It's all BLACK. It's like it has no SDL_GLContext;
I need to figure this out, then move onto events to make sure they also don't get lost. Anyone have any idea why it's going back?