Check this bug http://code.google.com/p/android/issues/detail?id=2828&q=glsurfaceview&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars - as you'll see current implementation allows only one glsurfaceview instance per process
On Mar 18, 8:36 am, Tim Liu <[email protected]> wrote: > Hi, > > I'm having a problem when I create a Sub-Activity to my main > activity. Both activities have their own GLSurfaceViews. Nothing on > Logcat. Basically It just opens up the new view and it's black and it > never renders with the new opengl stuff. I've tried a bunch of stuff, > just want to know if there's some special way I need to pause the > first opengl activity to get the second to run, or if there's some > toggle which I am missing, or if it just can't be done. When I open > the second activity with a GLSurface View, the first activity stops > drawing frames, but the second one, never initializes or starts to > draw. > > Main Activity Creation: > > GLSurfaceView view = new GLSurfaceView(this); > OpenGLRenderer renderer = new OpenGLRenderer(this); > view.setRenderer(renderer); > view.setOnTouchListener(renderer.tListener); > setContentView(view); > > Sub Activity Invokation inside of OpenGLRenderer: > > intent = new Intent(); > intent.setClass(context, PickAPlayerActivity.class); > context.startActivity(intent); > > Sub Activity Creation: > > setContentView(R.layout.pickaplayerview); > GLSurfaceView view = (GLSurfaceView) findViewById(R.id.jerseys); > CoverFlowRenderer cover = new CoverFlowRenderer(this); > view.setRenderer(cover); > view.setOnTouchListener(cover.tListener); -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

