If that happens it means you are creating your OpenGL context on the UI thread. Or that you are running some of your GL code on the UI thread. I have seen apps do this before (Google Maps had such a bug before we shipped 4.0 for instance.)
Drivers usually generate the same series of names when you invoke glGenTextures(). For instance, if you invoke glGenTextures() in two different GL contexts on two different threads, both calls will return the same value (for instance 1 on Tegra.) This means that if you run your code on the wrong context/thread you are likely to use a texture that's not yours but has the same identifier. If you are creating your OpenGL context on the UI thread you should always make sure to call eglMakeCurrent() before you do anything else, otherwise your GL commands will run on the context created by the UI toolkit. If you creating your OpenGL context on another thread, make sure that all of your GL commands are executed on that particular thread. On Wed, Dec 28, 2011 at 1:23 PM, carlrice <[email protected]> wrote: > I have an Android app which uses a bit of OpenGL running on a Galaxy > Nexus with ICS. After turning on hardware acceleration and using my > OpenGL activity some of those textures are stolen by the system and > now in my listviews and other UI elements. Its as if my GL pointers > obtained via GLES20.glGenTextures are not actually fresh pointers but > rather overwriting ones used by the window renderer. > > In any case there should be some sort of firewall or sandbox between > the OS screen drawing system and my app, no? > > Turning off hardwareAcceleration entirely displays fine, but the UI is > choppy (but buttery smooth on 2.2+ either way). Turning it on/off > activity by activity doesn't help either. > > Example: Normally a repeating bitmap drawable, now an image (from > camera in this case) I loaded into OpenGL in a different activity - > http://a.yfrog.com/img532/9245/t81k.png > > -- > 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 -- Romain Guy Android framework engineer [email protected] -- 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

