wood burning stoves*
The moose likes Android and the fly likes Android splashscreen using openGL ES 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Android splashscreen using openGL ES 2.0" Watch "Android splashscreen using openGL ES 2.0" New topic

Android splashscreen using openGL ES 2.0

Stephen Bell
Ranch Hand

Joined: May 11, 2013
Posts: 38
Hey all

I'm writing an app (game) with openGL ES 2.0 on Android and having a lot of problems understanding how to code a splashscreen.

Currently, I'm loading all of my resources in my onSurfaceCreated method and creating all of my game objects in my onSurfaceChanged method.

On older/slower devices there is a 4 second (aprox) pause with a blank screen before anything starts (while, I assume it loads and creates everything) - I deem this visible pause to be unacceptable and would like to put a simple splashscreen in it's place. What I'm after is just a screen saying 'loading' and then an indicator of some description with the estimated time remaining.

I'm not sure how to do this. I don't want to use separate activities (I've designed my entire game to be within one activity).

I can't display a 'loading' screen because onDrawFrame doesn't run until after everything has loaded!

So how do I do this?! Am I supposed to have multiple rendering classes and then switch between them or is there another way?

(Also I probably should point out if it's relevant that my app uses no XML, it's all in code (Java) , so a code-only solution would be preferable!)

Thanks all I hope you can help :-)

Stephen Bell
Ranch Hand

Joined: May 11, 2013
Posts: 38
Anyone have any ideas with this? Really struggling with it, any help or pointers would really be appreciated - thanks all.
It is sorta covered in the JavaRanch Style Guide.
subject: Android splashscreen using openGL ES 2.0
Similar Threads
what basic knowledge required to start with android gaming besides android app development?
Loading resources in Android app
Flash-like games / apps for Android
SurfaceView and OPENGL/ES
JLabel not displaying in JWindow splash