Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I create my game element this way in my activity:

public void onCreate(Bundle savedInstanceState) {
  mGame = new Game(this);

Then in my bootstrap I create my GLsurfaceView this way: (callingActivity is the this I passed when I created mGame)

CommonObject.sCommonParams.openGLView = new GLSurfaceView(callingActivity);
CommonObject.sCommonParams.openGLView.setRenderer(new GameRenderer());

Is it because I pass GLSurfaceView to a static object that it's not working?

share|improve this question
up vote 0 down vote accepted

Turns out I had to


for onSurfaceCreated to run. Which is sad since I was trying to avoid doing that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.