mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Simplifications
This commit is contained in:
parent
4ff6d8c108
commit
de3c1a04db
@ -871,7 +871,8 @@ bool gl_init_hw_render(gl_t *gl, unsigned width, unsigned height)
|
||||
stencil = hwr->stencil;
|
||||
|
||||
#ifdef HAVE_OPENGLES
|
||||
if (!gl_check_capability(GL_CAPS_PACKED_DEPTH_STENCIL))
|
||||
if (!hwr->stencil &&
|
||||
!gl_check_capability(GL_CAPS_PACKED_DEPTH_STENCIL))
|
||||
return false;
|
||||
RARCH_LOG("[GL]: Supports Packed depth stencil.\n");
|
||||
#endif
|
||||
|
@ -31,10 +31,6 @@
|
||||
|
||||
#include <gfx/gl_capabilities.h>
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#include "../../gfx/video_driver.h"
|
||||
#endif
|
||||
|
||||
static bool gl_core_context = false;
|
||||
|
||||
bool gl_query_core_context_in_use(void)
|
||||
@ -52,19 +48,6 @@ void gl_query_core_context_unset(void)
|
||||
gl_core_context = false;
|
||||
}
|
||||
|
||||
static bool has_hardware_stencil(void)
|
||||
{
|
||||
#ifdef RARCH_INTERNAL
|
||||
struct retro_hw_render_callback *hwr =
|
||||
video_driver_get_hw_context();
|
||||
if (!hwr)
|
||||
return false;
|
||||
return hwr->stencil;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool gl_query_extension(const char *ext)
|
||||
{
|
||||
bool ret = false;
|
||||
@ -227,16 +210,13 @@ bool gl_check_capability(enum gl_capability_enum enum_idx)
|
||||
#endif
|
||||
break;
|
||||
case GL_CAPS_PACKED_DEPTH_STENCIL:
|
||||
{
|
||||
if (!has_hardware_stencil())
|
||||
return false;
|
||||
if (major >= 3)
|
||||
return true;
|
||||
if ( !gl_query_extension("OES_packed_depth_stencil")
|
||||
&& !gl_query_extension("EXT_packed_depth_stencil"))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
if (major >= 3)
|
||||
return true;
|
||||
if (gl_query_extension("OES_packed_depth_stencil"))
|
||||
return true;
|
||||
if (gl_query_extension("EXT_packed_depth_stencil"))
|
||||
return true;
|
||||
break;
|
||||
case GL_CAPS_ES2_COMPAT:
|
||||
#ifndef HAVE_OPENGLES
|
||||
/* ATI card detected, skipping check for GL_RGB565 support... */
|
||||
|
Loading…
Reference in New Issue
Block a user