(gl_raster_font) Enable GL_R8 atlas for GL >= 3

This commit is contained in:
Higor Eurípedes 2015-07-18 14:19:31 -03:00
parent 4f69b5e34b
commit f9f98f9f2e

View File

@ -60,7 +60,12 @@ static bool gl_raster_font_upload_atlas(gl_raster_t *font,
uint8_t *tmp = NULL;
#ifndef HAVE_OPENGLES
if (font->gl->core_context)
struct retro_hw_render_callback *cb = video_driver_callback();
bool modern = font->gl->core_context ||
(cb->context_type == RETRO_HW_CONTEXT_OPENGL &&
cb->version_major >= 3);
if (modern)
{
GLint swizzle[] = { GL_ONE, GL_ONE, GL_ONE, GL_RED };
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzle);