On Tue, Feb 28, 2012 at 4:47 PM, saex <[email protected]> wrote: > In some point of my app i need to changue the texture of a polygon. > > For that, i must load a bitmap from assets folder and then i pass the > bitmap to a "loadBitmap" method of my polygon that changes the > texture. > > It is working fine, but i need to move the code into a thread, because > the loading time of the bitmap it's frozing my opengl polygon when > it's loading the bitmap from assets folder. > > Because that i implemented a thread that it is called to change the > texture, but something is going wrong because my texture is empty > (white) when i use the thread, but it works if i dont use the thread,
Sounds a bit like you access your GL context from multiple threads. Keep in mind that normally only the thread that created a GL context can call GL functions. In your particular case, if your problem really is that loading a bitmap from assets is too slow, you should probably have your worker thread do just that, load a Bitmap from assets, and do the rest (GL texture setup) back on your GL thread. -- 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

