mirror of https://github.com/axmolengine/axmol.git
fix android problem with 24 bit depth buffer on some devices (#18148)
This commit is contained in:
parent
04b2dbbcdb
commit
a8026b0136
|
@ -360,6 +360,17 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe
|
||||||
EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
||||||
EGL10.EGL_NONE
|
EGL10.EGL_NONE
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// GL ES 2 with user set
|
||||||
|
EGL10.EGL_RED_SIZE, mConfigAttributes[0],
|
||||||
|
EGL10.EGL_GREEN_SIZE, mConfigAttributes[1],
|
||||||
|
EGL10.EGL_BLUE_SIZE, mConfigAttributes[2],
|
||||||
|
EGL10.EGL_ALPHA_SIZE, mConfigAttributes[3],
|
||||||
|
EGL10.EGL_DEPTH_SIZE, mConfigAttributes[4] >= 24 ? 16 : mConfigAttributes[4],
|
||||||
|
EGL10.EGL_STENCIL_SIZE, mConfigAttributes[5],
|
||||||
|
EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
||||||
|
EGL10.EGL_NONE
|
||||||
|
},
|
||||||
{
|
{
|
||||||
// GL ES 2 by default
|
// GL ES 2 by default
|
||||||
EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
||||||
|
|
Loading…
Reference in New Issue