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
Post a Comment