mirror of
https://github.com/libretro/RetroArch
synced 2025-01-04 02:50:05 +00:00
(gl_raster_font.c) Cleanups
This commit is contained in:
parent
0fc31d2616
commit
4039bc89d6
@ -60,23 +60,20 @@ static bool gl_raster_font_upload_atlas(gl_raster_t *font,
|
|||||||
uint8_t *tmp = NULL;
|
uint8_t *tmp = NULL;
|
||||||
struct retro_hw_render_callback *hwr = NULL;
|
struct retro_hw_render_callback *hwr = NULL;
|
||||||
bool ancient = false; /* add a check here if needed */
|
bool ancient = false; /* add a check here if needed */
|
||||||
bool modern = font->gl->core_context;
|
|
||||||
|
|
||||||
video_driver_ctl(RARCH_DISPLAY_CTL_HW_CONTEXT_GET, &hwr);
|
video_driver_ctl(RARCH_DISPLAY_CTL_HW_CONTEXT_GET, &hwr);
|
||||||
|
|
||||||
modern = modern ||
|
|
||||||
(hwr->context_type == RETRO_HW_CONTEXT_OPENGL &&
|
|
||||||
hwr->version_major >= 3);
|
|
||||||
|
|
||||||
if (ancient)
|
if (ancient)
|
||||||
{
|
{
|
||||||
gl_internal = gl_format = GL_RGBA;
|
gl_internal = GL_RGBA;
|
||||||
|
gl_format = GL_RGBA;
|
||||||
ncomponents = 4;
|
ncomponents = 4;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_OPENGLES
|
|
||||||
(void)modern;
|
#if defined(GL_VERSION_3_0)
|
||||||
#elif defined(GL_VERSION_3_0)
|
if (font->gl->core_context ||
|
||||||
else if (modern)
|
(hwr->context_type == RETRO_HW_CONTEXT_OPENGL &&
|
||||||
|
hwr->version_major >= 3))
|
||||||
{
|
{
|
||||||
GLint swizzle[] = { GL_ONE, GL_ONE, GL_ONE, GL_RED };
|
GLint swizzle[] = { GL_ONE, GL_ONE, GL_ONE, GL_RED };
|
||||||
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzle);
|
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzle);
|
||||||
|
Loading…
Reference in New Issue
Block a user