From 3d4d3f6b112ab5d6da21ab5e8a9147585df29327 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Mon, 13 Jan 2014 03:14:09 -0600 Subject: [PATCH] [GLExtensions] Remove a bunch of unneeded headers. Fix Linux+EGL compiling. Move include to glx.h around to work around it including global GL/gl.h --- CMakeLists.txt | 4 ---- Source/Core/DolphinWX/Android/ButtonManager.cpp | 2 -- Source/Core/DolphinWX/GLInterface.h | 9 +++------ Source/Core/DolphinWX/GLInterface/EGL.h | 8 +------- Source/Core/DolphinWX/GLInterface/GLX.h | 5 ----- Source/Core/DolphinWX/GLInterface/X11_Util.cpp | 6 ------ 6 files changed, 4 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d9b51818d..a533e6453d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -352,10 +352,6 @@ if(NOT ANDROID) if(NOT USE_GLES3) include(FindOpenGL) - include_directories(${OPENGL_INCLUDE_DIR}) - add_definitions(-DGLEW_NO_GLU) - else() - set(X11_FOUND 1) endif() include(FindALSA OPTIONAL) diff --git a/Source/Core/DolphinWX/Android/ButtonManager.cpp b/Source/Core/DolphinWX/Android/ButtonManager.cpp index f3127678fa..ceabbb581c 100644 --- a/Source/Core/DolphinWX/Android/ButtonManager.cpp +++ b/Source/Core/DolphinWX/Android/ButtonManager.cpp @@ -19,8 +19,6 @@ #include "GLInterface.h" #include "Android/ButtonManager.h" -extern void DrawButton(GLuint tex, float *coords); - namespace ButtonManager { // Pair key is padID, BUTTONTYPE diff --git a/Source/Core/DolphinWX/GLInterface.h b/Source/Core/DolphinWX/GLInterface.h index 1209267bdb..dd318dce33 100644 --- a/Source/Core/DolphinWX/GLInterface.h +++ b/Source/Core/DolphinWX/GLInterface.h @@ -10,12 +10,7 @@ #else #include "Thread.h" -#ifdef ANDROID -#include -#include -#include -#include "GLInterface/EGL.h" -#elif defined(USE_EGL) && USE_EGL +#if defined(USE_EGL) && USE_EGL #include "GLInterface/EGL.h" #elif defined(__APPLE__) #include "GLInterface/AGL.h" @@ -23,10 +18,12 @@ #include "GLInterface/WGL.h" #elif defined(HAVE_X11) && HAVE_X11 #include "GLInterface/GLX.h" +#include #else #error Platform doesnt have a GLInterface #endif + typedef struct { #if defined(USE_EGL) && USE_EGL // This is currently a X11/EGL implementation for desktop int screen; diff --git a/Source/Core/DolphinWX/GLInterface/EGL.h b/Source/Core/DolphinWX/GLInterface/EGL.h index 07dfbbc347..87b40fad55 100644 --- a/Source/Core/DolphinWX/GLInterface/EGL.h +++ b/Source/Core/DolphinWX/GLInterface/EGL.h @@ -17,13 +17,7 @@ #ifndef _INTERFACEEGL_H_ #define _INTERFACEEGL_H_ -#if USE_GLES -#include -#else -#include -#include -#endif - +#include #include "InterfaceBase.h" class cPlatform; diff --git a/Source/Core/DolphinWX/GLInterface/GLX.h b/Source/Core/DolphinWX/GLInterface/GLX.h index cb0d2039f3..c7c2dd4411 100644 --- a/Source/Core/DolphinWX/GLInterface/GLX.h +++ b/Source/Core/DolphinWX/GLInterface/GLX.h @@ -17,11 +17,6 @@ #ifndef _INTERFACEGLX_H_ #define _INTERFACEGLX_H_ -#include -#include -#include -#include - #include "X11_Util.h" #include "InterfaceBase.h" diff --git a/Source/Core/DolphinWX/GLInterface/X11_Util.cpp b/Source/Core/DolphinWX/GLInterface/X11_Util.cpp index e3ea3f3c90..c8aa476ee2 100644 --- a/Source/Core/DolphinWX/GLInterface/X11_Util.cpp +++ b/Source/Core/DolphinWX/GLInterface/X11_Util.cpp @@ -69,12 +69,6 @@ bool cXInterface::Initialize(void *config) if (GLWin.parent == 0) GLWin.parent = RootWindow(GLWin.dpy, GLWin.screen); - /* Set initial projection/viewing transformation. - * We can't be sure we'll get a ConfigureNotify event when the window - * first appears. - */ - glViewport(0, 0, (GLint) GLWin.width, (GLint) GLWin.height); - return true; }