mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(XMB)(GLUI) Better fix for the GL texture format bug
This commit is contained in:
parent
48e56da8be
commit
ef7e210719
@ -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;
|
||||
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user