Text only thing visible after pausing GLSurfaceView on Galaxy S3 - Text blur when moved. No button backgrounds

空扰寡人 提交于 2019-12-06 17:47:26

It turns out I was calling the function to setup openGL on the UI Thread. I was calling my draw() (etc) methods in the thread created by the Renderer attached to my GLSurfaceView . Because the setup method was being called on the UI thread the openGL used for hardware acceleration was being corrupted.

TL;DR: don't make ANY (even setup) calls outside of the Renderer class used for GLSurfaceView as it creates a separate thread so your openGL calls don't interfere with the openGL running on the UI Thread used for hardware acceleration.

An easy test to see if your app is plagued by this issue is to disable hardware acceleration in your android manifest and check whether the issue goes away or not:

<application android:hardwareAccelerated="false" ...>

I hope this helps someone else :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!