}
static int
-_set_internal_config(Render_Engine_GL_Surface *sfc, Evas_GL_Config *cfg)
+_set_internal_config(Render_Engine *re, Render_Engine_GL_Surface *sfc, Evas_GL_Config *cfg)
{
// Also initialize pixel format here as well...
switch(cfg->color_format)
case EVAS_GL_STENCIL_BIT_2:
case EVAS_GL_STENCIL_BIT_4:
case EVAS_GL_STENCIL_BIT_8:
- sfc->rb_stencil_fmt = GL_STENCIL_INDEX8;
+ if ((cfg->depth_bits != EVAS_GL_DEPTH_NONE) &&
+ re->gl_cap.depth_24_stencil_8[0])
+ {
+ sfc->rb_depth_stencil_fmt = re->gl_cap.depth_24_stencil_8[0];
+ sfc->rb_depth_fmt = re->gl_cap.depth_24_stencil_8[0];
+ sfc->rb_stencil_fmt = re->gl_cap.depth_24_stencil_8[0];
+ }
+ else
+ {
+ sfc->rb_stencil_fmt = GL_STENCIL_INDEX8;
+ }
break;
case EVAS_GL_STENCIL_BIT_16:
default:
return 0;
}
- // Do Packed Depth24_Stencil8 Later...
-
return 1;
}
}
// Set the internal format based on the config
- if (!_set_internal_config(sfc, cfg))
+ if (!_set_internal_config(re, sfc, cfg))
{
ERR("Unsupported Format!");
goto finish;