mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-04 10:36:50 +00:00
Get rid of more ifdefs
This commit is contained in:
parent
0f6a3c8f9d
commit
dc700c5d8b
@ -60,11 +60,8 @@ typedef struct gl
|
||||
bool quitting;
|
||||
bool fullscreen;
|
||||
bool keep_aspect;
|
||||
#ifdef HAVE_OPENGLES
|
||||
bool support_unpack_row_length;
|
||||
#else
|
||||
bool have_es2_compat;
|
||||
#endif
|
||||
bool have_full_npot_support;
|
||||
|
||||
bool egl_images;
|
||||
|
@ -1596,11 +1596,11 @@ static bool resolve_extensions(gl_t *gl, const char *context_ident)
|
||||
* The speed gain from using GL_RGB565 is worth
|
||||
* adding some workarounds for.
|
||||
*/
|
||||
gl->have_es2_compat = gl_check_capability(GL_CAPS_ES2_COMPAT);
|
||||
gl->have_full_npot_support = gl_check_capability(GL_CAPS_FULL_NPOT_SUPPORT);
|
||||
#endif
|
||||
|
||||
gl->have_es2_compat = gl_check_capability(GL_CAPS_ES2_COMPAT);
|
||||
gl->have_sync = gl_check_capability(GL_CAPS_SYNC);
|
||||
|
||||
if (gl->have_sync && settings->bools.video_hard_sync)
|
||||
RARCH_LOG("[GL]: Using ARB_sync to reduce latency.\n");
|
||||
|
||||
@ -1616,12 +1616,11 @@ static bool resolve_extensions(gl_t *gl, const char *context_ident)
|
||||
}
|
||||
|
||||
/* GLES3 has unpack_subimage and sRGB in core. */
|
||||
gl->support_unpack_row_length = gl_check_capability(GL_CAPS_UNPACK_ROW_LENGTH);
|
||||
gl->has_srgb_fbo_gles3 = gl_check_capability(GL_CAPS_SRGB_FBO_ES3);
|
||||
|
||||
/* TODO/FIXME - No extensions for float FBO currently. */
|
||||
#endif
|
||||
|
||||
gl->support_unpack_row_length = gl_check_capability(GL_CAPS_UNPACK_ROW_LENGTH);
|
||||
gl->has_fp_fbo = gl_check_capability(GL_CAPS_FP_FBO);
|
||||
if (settings->bools.video_force_srgb_disable)
|
||||
gl->has_srgb_fbo = false;
|
||||
@ -1686,7 +1685,6 @@ static INLINE void gl_set_texture_fmts(gl_t *gl, bool rgb32)
|
||||
gl->texture_type = GL_RGBA;
|
||||
}
|
||||
}
|
||||
#ifndef HAVE_OPENGLES
|
||||
else if (gl->have_es2_compat)
|
||||
{
|
||||
RARCH_LOG("[GL]: Using GL_RGB565 for texture uploads.\n");
|
||||
@ -1694,7 +1692,6 @@ static INLINE void gl_set_texture_fmts(gl_t *gl, bool rgb32)
|
||||
gl->texture_type = RARCH_GL_TEXTURE_TYPE16_565;
|
||||
gl->texture_fmt = RARCH_GL_FORMAT16_565;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_GL_ASYNC_READBACK
|
||||
|
Loading…
x
Reference in New Issue
Block a user