Get rid of most of the HAVE_FBO usage

This commit is contained in:
twinaphex 2017-11-13 06:20:30 +01:00
parent 6fa5fcfa1f
commit ec123ef6ca
4 changed files with 21 additions and 24 deletions

View File

@ -92,14 +92,10 @@
#define glGenerateMipmap glGenerateMipmapOES
#endif
#ifdef HAVE_FBO
#if defined(__APPLE__) || defined(HAVE_PSGL)
#define GL_RGBA32F GL_RGBA32F_ARB
#endif
#endif
#if defined(HAVE_PSGL)
#define RARCH_GL_INTERNAL_FORMAT32 GL_ARGB_SCE
#define RARCH_GL_INTERNAL_FORMAT16 GL_RGB5 /* TODO: Verify if this is really 565 or just 555. */

View File

@ -743,7 +743,6 @@ static void gl2_renderchain_start_render(void *data,
void gl2_renderchain_init(
void *data, unsigned fbo_width, unsigned fbo_height)
{
#ifdef HAVE_FBO
int i;
unsigned width, height;
video_shader_ctx_scale_t scaler;
@ -846,7 +845,6 @@ void gl2_renderchain_init(
}
gl->fbo_inited = true;
#endif
}
static bool gl2_renderchain_init_hw_render(

View File

@ -1796,21 +1796,21 @@ bool video_driver_find_driver(void)
current_video = NULL;
#if defined(HAVE_VULKAN)
if (hwr && hw_render_context_is_vulkan(hwr->context_type))
{
#if defined(HAVE_VULKAN)
RARCH_LOG("[Video]: Using HW render, Vulkan driver forced.\n");
current_video = &video_vulkan;
#endif
}
#endif
#if defined(HAVE_OPENGL)
if (hwr && hw_render_context_is_gl(hwr->context_type))
{
#if defined(HAVE_OPENGL) && defined(HAVE_FBO)
RARCH_LOG("[Video]: Using HW render, OpenGL driver forced.\n");
current_video = &video_gl;
#endif
}
#endif
if (current_video)
return true;

View File

@ -173,8 +173,9 @@ bool gl_check_capability(enum gl_capability_enum enum_idx)
case GL_CAPS_FBO:
#if defined(HAVE_PSGL) || defined(HAVE_OPENGLES2) || defined(HAVE_OPENGLES3) || defined(HAVE_OPENGLES_3_1) || defined(HAVE_OPENGLES_3_2)
return true;
#elif defined(HAVE_FBO)
if (!gl_query_core_context_in_use() && !gl_query_extension("ARB_framebuffer_object")
#else
if ( !gl_query_core_context_in_use()
&& !gl_query_extension("ARB_framebuffer_object")
&& !gl_query_extension("EXT_framebuffer_object"))
return false;
@ -190,8 +191,6 @@ bool gl_check_capability(enum gl_capability_enum enum_idx)
&& glDeleteRenderbuffers)
return true;
break;
#else
break;
#endif
case GL_CAPS_ARGB8:
#ifdef HAVE_OPENGLES
@ -280,21 +279,25 @@ bool gl_check_capability(enum gl_capability_enum enum_idx)
#if defined(HAVE_OPENGLES)
if (major >= 3 || gl_query_extension("EXT_sRGB"))
return true;
#elif defined(HAVE_FBO)
if (gl_query_core_context_in_use() ||
(gl_query_extension("EXT_texture_sRGB")
&& gl_query_extension("ARB_framebuffer_sRGB")))
return true;
#endif
if (gl_check_capability(GL_CAPS_FBO))
{
if ( gl_query_core_context_in_use() ||
(gl_query_extension("EXT_texture_sRGB")
&& gl_query_extension("ARB_framebuffer_sRGB"))
)
return true;
}
break;
case GL_CAPS_FP_FBO:
/* GLES - No extensions for float FBO currently. */
#ifndef HAVE_OPENGLES
#ifdef HAVE_FBO
/* Float FBO is core in 3.2. */
if (gl_query_core_context_in_use() || gl_query_extension("ARB_texture_float"))
return true;
#endif
if (gl_check_capability(GL_CAPS_FBO))
{
/* Float FBO is core in 3.2. */
if (gl_query_core_context_in_use() || gl_query_extension("ARB_texture_float"))
return true;
}
#endif
break;
case GL_CAPS_BGRA8888: