From 9c4b7e003d207aeb88daaf2411942eef7bc48529 Mon Sep 17 00:00:00 2001 From: Sung Park Date: Thu, 3 May 2012 06:42:37 +0000 Subject: [PATCH] For Evas_GL surface config, prefer to use GL_DEPTH24_STENCIL8 format internally when it's available instead of using them separately. SVN revision: 70686 --- .../src/modules/engines/gl_x11/evas_engine.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c index 55ec1e6feb..6445a776bd 100644 --- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c +++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c @@ -3004,7 +3004,7 @@ _set_internal_config(Render_Engine *re, Render_Engine_GL_Surface *sfc, Evas_GL_C return 0; } - switch(cfg->depth_bits) + switch((int)cfg->depth_bits) { case EVAS_GL_DEPTH_NONE: break; @@ -3042,7 +3042,7 @@ _set_internal_config(Render_Engine *re, Render_Engine_GL_Surface *sfc, Evas_GL_C return 0; } - switch(cfg->stencil_bits) + switch((int)cfg->stencil_bits) { case EVAS_GL_STENCIL_NONE: break; @@ -3068,19 +3068,19 @@ _set_internal_config(Render_Engine *re, Render_Engine_GL_Surface *sfc, Evas_GL_C break; } case EVAS_GL_STENCIL_BIT_8: - if (re->gl_cap.stencil_8) + if ((sfc->rb_depth_fmt == re->gl_cap.depth_24) && (re->gl_cap.depth_24_stencil_8)) + { + sfc->rb_depth_stencil_fmt = re->gl_cap.depth_24_stencil_8; + sfc->rb_stencil_fmt = re->gl_cap.stencil_8; + cfg->stencil_bits = EVAS_GL_STENCIL_BIT_8; + break; + } + else if (re->gl_cap.stencil_8) { sfc->rb_stencil_fmt = re->gl_cap.stencil_8; cfg->stencil_bits = EVAS_GL_STENCIL_BIT_8; break; } - else if (re->gl_cap.depth_24_stencil_8) - { - sfc->rb_depth_stencil_fmt = re->gl_cap.depth_24_stencil_8; - cfg->depth_bits = EVAS_GL_DEPTH_BIT_24; - cfg->stencil_bits = EVAS_GL_STENCIL_BIT_8; - break; - } case EVAS_GL_STENCIL_BIT_16: if (re->gl_cap.stencil_16) {