diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index a05b7c1c67..de0e2b3f7b 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -509,8 +509,11 @@ static GLuint glui_png_texture_load_(const char * file_name) /* Generate the OpenGL texture object */ glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ti.width, ti.height, 0, - GL_RGBA, GL_UNSIGNED_BYTE, ti.pixels); + glTexImage2D(GL_TEXTURE_2D, 0, driver.gfx_use_rgba ? + GL_RGBA : RARCH_GL_INTERNAL_FORMAT32, + ti.width, ti.height, 0, + driver.gfx_use_rgba ? GL_RGBA : RARCH_GL_TEXTURE_TYPE32, + RARCH_GL_FORMAT32, ti.pixels); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -553,8 +556,6 @@ static void glui_context_reset(void *data) (void)gl; - driver.gfx_use_rgba = true; - if (!menu) return; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 4e8cfc33ed..6812951eba 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -586,8 +586,11 @@ static GLuint xmb_png_texture_load_(const char * file_name) /* Generate the OpenGL texture object */ glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ti.width, ti.height, 0, - GL_RGBA, GL_UNSIGNED_BYTE, ti.pixels); + glTexImage2D(GL_TEXTURE_2D, 0, driver.gfx_use_rgba ? + GL_RGBA : RARCH_GL_INTERNAL_FORMAT32, + ti.width, ti.height, 0, + driver.gfx_use_rgba ? GL_RGBA : RARCH_GL_TEXTURE_TYPE32, + RARCH_GL_FORMAT32, ti.pixels); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glGenerateMipmap(GL_TEXTURE_2D); @@ -1331,8 +1334,6 @@ static void xmb_context_reset(void *data) if (!xmb) return; - driver.gfx_use_rgba = true; - fill_pathname_join(bgpath, g_settings.assets_directory, "xmb", sizeof(bgpath));