Hi,

This problem about VM bugdet is probably not related to the GLSurface 
itself but to the Bitmap objects you're holding, ensure you'll never keep 
Bitmap references on any object. Just load it, create the texture, keep the 
texture ID's on hand and make =null in all your Bitmap references or you'll 
get this VM budget error soon, I'm saying it by my experience having the 
same issue, as I stopped to keep these references I got able to load lots 
of Mbs of bitmaps without problem.

About recreating the GLSurface, does you really need to do it? I think this 
is not recommended, at least I don't recommend it. I think its preferable 
to you lean your vertex buffers, so on, and draw the other thing on the 
same surface, controlling the content you're drawing. The games that I'm 
developing have lot of screens with lots of polygons on buffers and I never 
recreate the GLSurface, I consider it's stability like sacred, not a thing 
to be over created every time.

Please report here if you problem got fixed.

Download my games: 
https://play.google.com/store/apps/details?id=com.fredrischter.memorygamememes.free

Please help on selecting name of my new game :) 
https://docs.google.com/spreadsheet/viewform?formkey=dFdFYXJkZVZFblo0eFNldU94Sk56RVE6MQ#gid=0

Regards,
Fred


Em segunda-feira, 12 de março de 2012 07h41min27s UTC-3, saex escreveu:
>
> I have a GLSurfaceView with four polygons with textures.
>
> I need to destroy the GLSurfaceview and recreate a new GLSurfaceView with 
> new parameters when the user press a button.
>
> I tryed with myGLSurfaceView = null and initializing again myGLSurfaceView 
> with the new paramters, but it is giving me VM budget bitmnap exception. I 
> dont understand why, because i am doing recicle() on all the bitmaps i use.
>
> So, i think that i need to destroy all the polygons of my glsurfaceview 
> and my glsurfaceview before tho recreating a new glsurfaceview.
>
> Wich is the correct way to achieve this?
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to