Weird idea IMHO... However...what exactly does not work?
I had see a 2D game code about like this
public boolean onTouchEvent(MotionEvent event) {
if(event.getAction()== MotionEvent.ACTION_UP){
int x = (int)event.getX();
int y = (int)event.getY();
if(current == welcome){
if(rectGallery.contains(x, y)){
welcome.cg.galleryTouchEvnet(x, y);
}
else if(rectSound.contains(x, y)){
this.wantSound = !this.wantSound;
return true;
}
else if(rectStart.contains(x, y)){
if(checkLayout(welcome.layout)){
layoutArray = welcome.layout;
lv = new LoadingView(this);
this.setContentView(lv);
this.current = lv;
lv.lt.start();
new Thread(){
public void run(){
Looper.prepare();
if(wantSound){
initSound();
}
gv = new GameView(FootballActivity.this,imageIDs[welcome.cg.currIndex]);
lv.progress = 100;
welcome = null;
}
}.start();
}
}
That is a welcome view ,and use a onTouchEvent set to another view(like game view).
I think maybe GLSurfaceView can be use some way , cross "welcomeGLview" to "gameGLview".
So , I try. But it Error.
Activity--------------------> welcome GLSurfaceView (use onTouchEvent picking a Object3D )------->game GLSurfaceView..
else if(rectStart.contains(x, y)){
if(checkLayout(welcome.layout)){
layoutArray = welcome.layout;
lv = new GLSurfaceView(this);
lv.setRenderer(glRenderer);
this.setContentView(lv);