diff --git a/Makefile.common b/Makefile.common
index eb895bdcb1..7eec2aff99 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -342,11 +342,11 @@ endif
ifeq ($(HAVE_OPENGL), 1)
DEFINES += -DHAVE_OPENGL -DHAVE_GLSL
OBJ += gfx/gl.o \
+ gfx/gl_common.o \
gfx/gfx_context.o \
gfx/fonts/gl_font.o \
gfx/fonts/gl_raster_font.o \
gfx/math/matrix.o \
- gfx/shader/shader_gl_common.o \
gfx/state_tracker.o \
gfx/glsym/rglgen.o
diff --git a/frontend/menu/disp/glui.c b/frontend/menu/disp/glui.c
index 23cc6727f8..b35c8bc994 100644
--- a/frontend/menu/disp/glui.c
+++ b/frontend/menu/disp/glui.c
@@ -26,7 +26,7 @@
#include "menu_display.h"
#include "../../../general.h"
#include "../../../gfx/gfx_common.h"
-#include "../../../gfx/shader/shader_gl_common.h"
+#include "../../../gfx/gl_common.h"
#include "../../../config.def.h"
#include "../../../file.h"
#include "../../../dynamic.h"
diff --git a/gfx/shader/shader_gl_common.c b/gfx/gl_common.c
similarity index 99%
rename from gfx/shader/shader_gl_common.c
rename to gfx/gl_common.c
index 5f181640dc..ce3ce02587 100644
--- a/gfx/shader/shader_gl_common.c
+++ b/gfx/gl_common.c
@@ -14,7 +14,7 @@
* If not, see .
*/
-#include "shader_gl_common.h"
+#include "gl_common.h"
void gl_load_texture_data(GLuint obj, const struct texture_image *img,
GLenum wrap, bool linear, bool mipmap)
diff --git a/gfx/gl_common.h b/gfx/gl_common.h
index 970c278cf2..1f9c80b26f 100644
--- a/gfx/gl_common.h
+++ b/gfx/gl_common.h
@@ -382,5 +382,10 @@ void gl_set_viewport(gl_t *gl, unsigned width, unsigned height,
void gl_shader_set_coords(gl_t *gl,
const struct gl_coords *coords, const math_matrix *mat);
-#endif
+void gl_load_texture_data(GLuint obj, const struct texture_image *img,
+ GLenum wrap, bool linear, bool mipmap);
+bool gl_load_luts(const struct gfx_shader *generic_shader,
+ GLuint *lut_textures);
+
+#endif
diff --git a/gfx/shader/shader_cg.c b/gfx/shader/shader_cg.c
index deda4525cb..85aff91861 100644
--- a/gfx/shader/shader_cg.c
+++ b/gfx/shader/shader_cg.c
@@ -18,14 +18,16 @@
#pragma comment(lib, "cggl")
#endif
-#ifdef HAVE_OPENGL
-#include "shader_gl_common.h"
-#endif
-
#include
#include "shader_context.h"
+
#include
+
+#ifdef HAVE_OPENGL
+#include "../gl_common.h"
#include
+#endif
+
#include "../../general.h"
#include
#include "../../compat/strl.h"
diff --git a/gfx/shader/shader_gl_common.h b/gfx/shader/shader_gl_common.h
deleted file mode 100644
index 1a26e6cf54..0000000000
--- a/gfx/shader/shader_gl_common.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* RetroArch - A frontend for libretro.
- * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
- * Copyright (C) 2011-2014 - Daniel De Matteis
- *
- * RetroArch is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Found-
- * ation, either version 3 of the License, or (at your option) any later version.
- *
- * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with RetroArch.
- * If not, see .
- */
-
-#ifndef SHADERS_GL_COMMON_H__
-#define SHADERS_GL_COMMON_H__
-
-#include "../gl_common.h"
-
-void gl_load_texture_data(GLuint obj, const struct texture_image *img,
- GLenum wrap, bool linear, bool mipmap);
-
-bool gl_load_luts(const struct gfx_shader *generic_shader,
- GLuint *lut_textures);
-
-#endif
diff --git a/gfx/shader/shader_glsl.c b/gfx/shader/shader_glsl.c
index fa08aa8fbc..7ec673487f 100644
--- a/gfx/shader/shader_glsl.c
+++ b/gfx/shader/shader_glsl.c
@@ -33,7 +33,7 @@
#include
#ifdef HAVE_OPENGL
-#include "shader_gl_common.h"
+#include "../gl_common.h"
#endif
#ifdef HAVE_OPENGLES2
diff --git a/griffin/griffin.c b/griffin/griffin.c
index c3d7c6fad8..f67aab3b63 100644
--- a/griffin/griffin.c
+++ b/griffin/griffin.c
@@ -145,9 +145,6 @@ VIDEO CONTEXT
/*============================================================
VIDEO SHADERS
============================================================ */
-#ifdef HAVE_OPENGL
-#include "../gfx/shader/shader_gl_common.c"
-#endif
#ifdef HAVE_SHADERS
#include "../gfx/shader/shader_context.c"
@@ -213,6 +210,7 @@ VIDEO DRIVER
#ifdef HAVE_OPENGL
#include "../gfx/gl.c"
+#include "../gfx/gl_common.c"
#ifndef HAVE_PSGL
#include "../gfx/glsym/rglgen.c"