0
创建我的游戏元素这样在我的活动:为什么onSurfaceCreated不会在此代码中运行?
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mGame = new Game(this);
mGame.bootstrap();
setContentView(CommonObject.sCommonParams.touch);
mGame.loadTextures();
}
然后在我的引导创建我GLsurfaceView是这样的:(callingActivity是,当我创建MGAME我通过了这一点)
CommonObject.sCommonParams.openGLView = new GLSurfaceView(callingActivity);
CommonObject.sCommonParams.openGLView.setRenderer(new GameRenderer());
CommonObject.sCommonParams.openGLView.setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
是否因为我将GLSurfaceView传递给它不工作的静态对象?