diff --git a/Makefile.common b/Makefile.common
index e88b106b5d..24670ea9b2 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -312,7 +312,6 @@ ifeq ($(HAVE_MENU_COMMON), 1)
menu/menu_setting.o \
menu/menu_database.o \
menu/menu_shader.o \
- menu/menu_texture.o \
menu/menu_entries.o \
menu/menu_entries_cbs_ok.o \
menu/menu_entries_cbs_cancel.o \
@@ -405,6 +404,7 @@ ifeq ($(HAVE_OPENGL), 1)
gfx/drivers_font/gl_raster_font.o \
libretro-common/gfx/math/matrix_4x4.o \
gfx/video_state_tracker.o \
+ gfx/video_texture.o \
libretro-common/glsym/rglgen.o
ifeq ($(HAVE_KMS), 1)
diff --git a/menu/menu_texture.c b/gfx/video_texture.c
similarity index 70%
rename from menu/menu_texture.c
rename to gfx/video_texture.c
index 47ada0ccc5..33a3e195d2 100644
--- a/menu/menu_texture.c
+++ b/gfx/video_texture.c
@@ -14,16 +14,15 @@
* If not, see .
*/
-#include "menu_texture.h"
+#include "video_texture.h"
#include
-#include "../general.h"
-#include "../gfx/video_pixel_converter.h"
-#include "../gfx/video_thread_wrapper.h"
+#include "video_pixel_converter.h"
+#include "video_thread_wrapper.h"
#ifdef HAVE_OPENGL
-#include "../gfx/gl_common.h"
+#include "gl_common.h"
-static void menu_texture_png_load_gl(struct texture_image *ti,
+static void video_texture_png_load_gl(struct texture_image *ti,
enum texture_filter_type filter_type,
unsigned *id)
{
@@ -38,7 +37,7 @@ static void menu_texture_png_load_gl(struct texture_image *ti,
}
#endif
-static unsigned menu_texture_png_load(void *data,
+static unsigned video_texture_png_load(void *data,
enum texture_backend_type type,
enum texture_filter_type filter_type)
{
@@ -51,7 +50,7 @@ static unsigned menu_texture_png_load(void *data,
{
case TEXTURE_BACKEND_OPENGL:
#ifdef HAVE_OPENGL
- menu_texture_png_load_gl((struct texture_image*)data, filter_type, &id);
+ video_texture_png_load_gl((struct texture_image*)data, filter_type, &id);
#endif
break;
case TEXTURE_BACKEND_DEFAULT:
@@ -62,25 +61,25 @@ static unsigned menu_texture_png_load(void *data,
return id;
}
-static int menu_texture_png_load_wrap(void *data)
+static int video_texture_png_load_wrap(void *data)
{
- return menu_texture_png_load(data, TEXTURE_BACKEND_DEFAULT,
+ return video_texture_png_load(data, TEXTURE_BACKEND_DEFAULT,
TEXTURE_FILTER_LINEAR);
}
-static int menu_texture_png_load_wrap_gl_mipmap(void *data)
+static int video_texture_png_load_wrap_gl_mipmap(void *data)
{
- return menu_texture_png_load(data, TEXTURE_BACKEND_OPENGL,
+ return video_texture_png_load(data, TEXTURE_BACKEND_OPENGL,
TEXTURE_FILTER_MIPMAP_LINEAR);
}
-static int menu_texture_png_load_wrap_gl(void *data)
+static int video_texture_png_load_wrap_gl(void *data)
{
- return menu_texture_png_load(data, TEXTURE_BACKEND_OPENGL,
+ return video_texture_png_load(data, TEXTURE_BACKEND_OPENGL,
TEXTURE_FILTER_LINEAR);
}
-unsigned menu_texture_load(void *data,
+unsigned video_texture_load(void *data,
enum texture_backend_type type,
enum texture_filter_type filter_type)
{
@@ -98,13 +97,13 @@ unsigned menu_texture_load(void *data,
case TEXTURE_BACKEND_OPENGL:
if (filter_type == TEXTURE_FILTER_MIPMAP_LINEAR ||
filter_type == TEXTURE_FILTER_MIPMAP_NEAREST)
- thr->cmd_data.custom_command.method = menu_texture_png_load_wrap_gl_mipmap;
+ thr->cmd_data.custom_command.method = video_texture_png_load_wrap_gl_mipmap;
else
- thr->cmd_data.custom_command.method = menu_texture_png_load_wrap_gl;
+ thr->cmd_data.custom_command.method = video_texture_png_load_wrap_gl;
break;
case TEXTURE_BACKEND_DEFAULT:
default:
- thr->cmd_data.custom_command.method = menu_texture_png_load_wrap;
+ thr->cmd_data.custom_command.method = video_texture_png_load_wrap;
break;
}
@@ -116,5 +115,5 @@ unsigned menu_texture_load(void *data,
return thr->cmd_data.custom_command.return_value;
}
- return menu_texture_png_load(data, type, filter_type);
+ return video_texture_png_load(data, type, filter_type);
}
diff --git a/menu/menu_texture.h b/gfx/video_texture.h
similarity index 88%
rename from menu/menu_texture.h
rename to gfx/video_texture.h
index ece249d4f3..10db315e05 100644
--- a/menu/menu_texture.h
+++ b/gfx/video_texture.h
@@ -14,10 +14,10 @@
* If not, see .
*/
-#ifndef _MENU_TEXTURE_MANAGER_H
-#define _MENU_TEXTURE_MANAGER_H
+#ifndef _VIDEO_TEXTURE_H
+#define _VIDEO_TEXTURE_H
-#include "../gfx/video_driver.h"
+#include "video_driver.h"
enum texture_backend_type
{
@@ -29,7 +29,7 @@ enum texture_backend_type
extern "C" {
#endif
-unsigned menu_texture_load(void *data,
+unsigned video_texture_load(void *data,
enum texture_backend_type type,
enum texture_filter_type filter_type);
diff --git a/griffin/griffin.c b/griffin/griffin.c
index 37ad551c93..5ddf002efa 100644
--- a/griffin/griffin.c
+++ b/griffin/griffin.c
@@ -169,6 +169,7 @@ VIDEO IMAGE
============================================================ */
#include "../gfx/image/image.c"
+#include "../gfx/video_texture.c"
#include "../libretro-common/formats/tga/tga_decode.c"
#include "../libretro-common/formats/png/rpng_fbio.c"
@@ -695,7 +696,6 @@ MENU
#include "../menu/menu_entries_cbs_contentlist_switch.c"
#include "../menu/menu_entries_cbs.c"
#include "../menu/menu_shader.c"
-#include "../menu/menu_texture.c"
#include "../menu/menu_navigation.c"
#include "../menu/menu_animation.c"
#include "../menu/menu_database.c"
diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c
index 4b869acadb..aad022273d 100644
--- a/menu/drivers/glui.c
+++ b/menu/drivers/glui.c
@@ -22,10 +22,10 @@
#include
#include "../menu.h"
-#include "../menu_texture.h"
#include
#include "../../gfx/gl_common.h"
+#include "../../gfx/video_texture.h"
#include
#include "shared.h"
@@ -546,7 +546,7 @@ static bool glui_load_wallpaper(void *data)
if (glui->textures.bg.id)
glDeleteTextures(1, &glui->textures.bg.id);
- glui->textures.bg.id = menu_texture_load(data,
+ glui->textures.bg.id = video_texture_load(data,
TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR);
return true;
diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c
index 3894360e0d..419ce947bc 100644
--- a/menu/drivers/xmb.c
+++ b/menu/drivers/xmb.c
@@ -22,11 +22,11 @@
#include "../menu.h"
#include "../menu_animation.h"
-#include "../menu_texture.h"
#include
-#include "../../gfx/gl_common.h"
#include "../../gfx/video_thread_wrapper.h"
+#include "../../gfx/gl_common.h"
+#include "../../gfx/video_texture.h"
#include
#include
@@ -1545,7 +1545,7 @@ static bool xmb_load_wallpaper(void *data)
if (xmb->textures.bg.id)
glDeleteTextures(1, &xmb->textures.bg.id);
- xmb->textures.bg.id = menu_texture_load(data,
+ xmb->textures.bg.id = video_texture_load(data,
TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR);
@@ -1652,7 +1652,7 @@ static void xmb_context_reset(void)
texture_image_load(&ti, path);
- xmb->textures.list[k].id = menu_texture_load(&ti,
+ xmb->textures.list[k].id = video_texture_load(&ti,
TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR);
texture_image_free(&ti);
@@ -1738,14 +1738,14 @@ static void xmb_context_reset(void)
texture_image_load(&ti, texturepath);
- node->icon = menu_texture_load(&ti,
+ node->icon = video_texture_load(&ti,
TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR);
texture_image_free(&ti);
texture_image_load(&ti, content_texturepath);
- node->content_icon = menu_texture_load(&ti,
+ node->content_icon = video_texture_load(&ti,
TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR);
texture_image_free(&ti);