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傳遞給它不工作的靜態對象?