mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
Get rid of most of the HAVE_FBO usage
This commit is contained in:
parent
6fa5fcfa1f
commit
ec123ef6ca
@ -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. */
|
||||
|
@ -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(
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user