What Is The Right Way To Choose An Egl Config In Android?
I'm using my own GLSurfaceView and have been struggling with crashes related to the EGL config chooser for a while. It seems as though requesting RGB_565 by calling setEGLConfigCho
Solution 1:
From my experience I do not think setEGLConfigChooser() actually works correctly, i.e. it has a bug in its implementation. Across a number of devices I have seen crashes where setEGLConfigChooser() fails to select a valid context even if the underlying surface is of the correct type.
I have found the only reliable way to choose an EGL context is with a custom EGLConfigChooser. This also has the added benefit of choosing a config based on your own rules, e.g. surface must have depth and preferably RGB888 but can settle for RGB565. This is actually pretty straightforward to use eglChooseConfig() to get a list of possible configurations and then return one of them that matches your selection criteria.
Post a Comment for "What Is The Right Way To Choose An Egl Config In Android?"