android - Why doesn't onSurfaceCreated ever run in this code? -


i create game element way in activity:

public void oncreate(bundle savedinstancestate) {   super.oncreate(savedinstancestate);   mgame = new game(this);   mgame.bootstrap();   setcontentview(commonobject.scommonparams.touch);   mgame.loadtextures(); } 

then in bootstrap create glsurfaceview way: (callingactivity passed when created mgame)

commonobject.scommonparams.openglview = new glsurfaceview(callingactivity); commonobject.scommonparams.openglview.setrenderer(new gamerenderer()); commonobject.scommonparams.openglview.setrendermode(glsurfaceview.rendermode_when_dirty); 

is because pass glsurfaceview static object it's not working?

turns out had to

setcontentview(commonobject.scommonparams.openglview); 

for onsurfacecreated run. sad since trying avoid doing that.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -