Skip to content Skip to sidebar Skip to footer

Android Displays Black Rectangles Instead Of Drawable Images After Opening Opengl Context

I am developing a simple Android app that has a few Activities, say: A, B, C, and D. *Activity A* is a splash screen. Calls finish() when same data finishes loading. Activity B dis

Solution 1:

Black boxes generally occur when the bitmap resource for an Image is no longer available (such as set to null or recycled).

In an openGL view, this can occur when an activity goes to the background, often because of lost context. A good place to start would be looking at the GLSurfaceView documentation, in particular the method setPreserveEGLContextOnPause(...).

Solution 2:

Adding android:hardwareAccelerated="false" to the <application> manifest is a workaround, however does not solve the problem. OpenGL state and context preservation as mentioned by Phil might play a role here.

Post a Comment for "Android Displays Black Rectangles Instead Of Drawable Images After Opening Opengl Context"