Draw the logo when app loads, until the first SDL_Flip(), also fixed small bug in menu

This commit is contained in:
pelya
2011-06-01 13:13:29 +03:00
parent 47b5d6938a
commit 550341ad8b
3 changed files with 84 additions and 15 deletions

View File

@@ -595,6 +595,8 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
public void setSwapBuffersCallback( SwapBuffersCallback c ) {
mSwapBuffersCallback = c;
}
public abstract void DrawLogo(GL10 gl);
private SwapBuffersCallback mSwapBuffersCallback = null;
}
@@ -904,7 +906,7 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
mNeedStart = true;
mSizeChanged = true;
SwapBuffers();
DrawLogo();
mRenderer.DrawLogo(mGL);
SwapBuffers();
mRenderer.onDrawFrame(mGL);
@@ -1113,16 +1115,6 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
return null;
}
private void DrawLogo() {
// TODO: draw some logo instead of making screen non-black
/*
mGL.glClearColor(0.0f, 0.5f, 0.7f, 1.0f);
mGL.glClear(mGL.GL_COLOR_BUFFER_BIT | mGL.GL_DEPTH_BUFFER_BIT);
mGL.glFlush();
mGL.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
*/
}
private boolean mDone;
private boolean mPaused;
private boolean mHasSurface;