tags:

views:

23

answers:

0

Just tried to get OpenGL going to do some more varied stuff, but for some reason, I can't get anything rendered. I've tried passing round a TextView object in each class and having every method add a line to it when it runs so I know what's been done and what hasn't, but for some reason only the Constructor for the Renderer gets run, onDrawFrame, onSurfaceCreated and onSurfaceChanged never are.

I can't find anything about any methods having to be used to start the Renderer going beyond assigning it and setting the GLSurfaceView as the content pane, so I'm not sure what I'm missing.

tv = new TextView(this);

testSurface = new GLSurfaceView(this);

testSurface.setRenderer(new Renderer(this, tv));
testSurface.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
//testSurface.setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);

setContentView(testSurface);

That's what I've got in the main method to set the surface view and renderer. I've tried continuous and when dirty, neither one calls anything. The Renderer constructor just sets up some buffers for the vertices to draw and adds its line to say it's been run, nothing important. Anyone got any ideas what I'm missing?