Check for GL_EXT_packed_depth_stencil
The GL_DEPTH_STENCIL format for renderbuffers is defined in a separate extension from GL_EXT_framebuffer_object so we probably shouldn't being trying to use it unless that extension is advertised. This just replaces the check for whether the driver is GL for a check for a private feature flag before trying GL_DEPTH_STENCIL. The private feature flag is set if the extension is available on GL. Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
@ -1006,10 +1006,9 @@ _cogl_offscreen_allocate (CoglOffscreen *offscreen,
|
||||
{
|
||||
if ((have_working_flags &&
|
||||
try_creating_fbo (offscreen, flags)) ||
|
||||
#ifdef HAVE_COGL_GL
|
||||
(ctx->driver == COGL_DRIVER_GL &&
|
||||
((ctx->private_feature_flags &
|
||||
COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL) &&
|
||||
try_creating_fbo (offscreen, flags = _TRY_DEPTH_STENCIL)) ||
|
||||
#endif
|
||||
try_creating_fbo (offscreen, flags = _TRY_DEPTH | _TRY_STENCIL) ||
|
||||
try_creating_fbo (offscreen, flags = _TRY_STENCIL) ||
|
||||
try_creating_fbo (offscreen, flags = _TRY_DEPTH) ||
|
||||
|
Reference in New Issue
Block a user