allright, I'll check that all. I think I reload my textures but I keep my old vertex buffer IDs...
thx a lot! On 22 sep, 19:23, Robert Green <[email protected]> wrote: > You can but you only need the callback information for knowing when > the surface has been created/modified or destroyed. The renderer will > get the same callbacks. > > The important things are these: > > Your activity should only be creating one GLSurfaceView in onCreate > and releasing it in onDestroy > Your activity onPause and onResume must call your GLSurfaceView's > onPause and onResume. > Ideally, your GLSurfaceView will create your renderer. > Your renderer needs to reload everything (textures, vbos, etc) to > video memory when the surface has changed. > After the surface has changed, when reloading, get all new texture and > vertex buffer IDs. Do not use the old ones or you could crash the gl > system. > > If you follow these rules, your app should play nicely with Android. > > On Sep 22, 11:05 am, Guian <[email protected]> wrote: > > > > > thx for your answer. I'm not familiar with it, should I use a > > SurfaceHolder.Callback to be notified when the surface is created and > > destroy ? > > > On 21 sep, 23:15, Robert Green <[email protected]> wrote: > > > > Check to make sure that at the time of resume, you're not hanging on > > > to old surface holders or anything like that. I use GLSurfaceView > > > onPause and onResume and they work correctly for me on the G1 and > > > Emulator. > > > > On Sep 21, 8:18 am, Guian <[email protected]> wrote: > > > > > well, I did put those lines in the onPause/onResume methods but still > > > > have the black screen with this error in the logcat: > > > > > ERROR/SurfaceComposerClient(15353): using an invalid surface id=0, > > > > identity=1431 should be 1435 > > > > > Doesn't seem exactly the same error... > > > > can anybody help please ? > > > > > On 30 août, 09:59, Cor <[email protected]> wrote: > > > > > > In the mean time I found this was a classic RTFM case ;-) > > > > > > If you use GLSurfaceView you have to call view.onPause() and > > > > > view.onResume() respectively in the activities onPause() and anResume > > > > > () methods --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

