diff --git a/gfx/drivers/gl_symlinks.h b/gfx/drivers/gl_symlinks.h index eee8c1f7a6..4184ae4106 100644 --- a/gfx/drivers/gl_symlinks.h +++ b/gfx/drivers/gl_symlinks.h @@ -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. */ diff --git a/gfx/drivers_renderchain/gl2_renderchain.c b/gfx/drivers_renderchain/gl2_renderchain.c index f8c9c046de..3d2cb24436 100644 --- a/gfx/drivers_renderchain/gl2_renderchain.c +++ b/gfx/drivers_renderchain/gl2_renderchain.c @@ -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( diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 031e93ef54..a6990fd23b 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -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; diff --git a/libretro-common/gfx/gl_capabilities.c b/libretro-common/gfx/gl_capabilities.c index 0cc8eda592..221aa2a0b7 100644 --- a/libretro-common/gfx/gl_capabilities.c +++ b/libretro-common/gfx/gl_capabilities.c @@ -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: