Move GLInterface to the OGL VideoBackend's directory.

This commit is contained in:
Augustin Cavalier
2014-11-02 12:16:33 -05:00
parent 089e32ba7d
commit 29593d403b
27 changed files with 82 additions and 74 deletions
+1 -32
View File
@@ -8,10 +8,6 @@ set(LIBS core
${GTK2_LIBRARIES})
if(NOT ANDROID)
if(USE_X11)
set(LIBS ${LIBS} ${XRANDR_LIBRARIES})
endif()
link_directories(${CMAKE_PREFIX_PATH}/lib)
else()
set(LIBS ${LIBS} png iconv)
@@ -76,31 +72,6 @@ set(WXLIBS ${wxWidgets_LIBRARIES} dl)
set(ANDROID_SRCS Android/ButtonManager.cpp
MainAndroid.cpp)
if(USE_EGL)
set(SRCS ${SRCS} GLInterface/EGL.cpp)
if(ANDROID)
set(SRCS ${SRCS} GLInterface/EGLAndroid.cpp)
elseif(USE_X11)
set(SRCS ${SRCS} GLInterface/EGLX11.cpp)
endif()
endif()
if(WIN32)
set(SRCS ${SRCS} GLInterface/WGL.cpp)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(SRCS ${SRCS} GLInterface/AGL.cpp)
elseif(USE_X11)
if (NOT USE_EGL)
set(SRCS ${SRCS} GLInterface/GLX.cpp)
# GLX has a hard dependency on libGL.
# Make sure to link to it if using GLX.
set(LIBS ${LIBS} ${OPENGL_LIBRARIES})
endif()
set(SRCS ${SRCS} GLInterface/X11_Util.cpp)
endif()
set(SRCS ${SRCS} GLInterface/GLInterface.cpp)
set(NOGUI_SRCS MainNoGUI.cpp)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
@@ -125,8 +96,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND SRCS ${RESOURCES})
set_source_files_properties(${RESOURCES} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
elseif(USE_X11)
set(SRCS ${SRCS} X11Utils.cpp)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
@@ -156,7 +125,7 @@ endif()
if(ANDROID)
set(DOLPHIN_EXE main)
add_library(${DOLPHIN_EXE} SHARED ${SRCS} ${ANDROID_SRCS})
target_link_libraries(${DOLPHIN_EXE}
target_link_libraries(${DOLPHIN_EXE}
log
android
"-Wl,--no-warn-mismatch"
+1 -1
View File
@@ -18,7 +18,7 @@
#include "Common/CommonTypes.h"
#if defined(HAVE_XRANDR) && HAVE_XRANDR
#include "DolphinWX/X11Utils.h"
#include "VideoBackends/OGL/GLInterface/X11Utils.h"
#endif
class wxBoxSizer;
-3
View File
@@ -78,8 +78,6 @@
<ClCompile Include="FrameAui.cpp" />
<ClCompile Include="FrameTools.cpp" />
<ClCompile Include="GameListCtrl.cpp" />
<ClCompile Include="GLInterface\GLInterface.cpp" />
<ClCompile Include="GLInterface\WGL.cpp" />
<ClCompile Include="HotkeyDlg.cpp" />
<ClCompile Include="InputConfigDiag.cpp" />
<ClCompile Include="InputConfigDiagBitmaps.cpp" />
@@ -131,7 +129,6 @@
<ClInclude Include="FifoPlayerDlg.h" />
<ClInclude Include="Frame.h" />
<ClInclude Include="GameListCtrl.h" />
<ClInclude Include="GLInterface\WGL.h" />
<ClInclude Include="Globals.h" />
<ClInclude Include="HotkeyDlg.h" />
<ClInclude Include="InputConfigDiag.h" />
@@ -27,8 +27,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="GLInterface\GLInterface.cpp" />
<ClCompile Include="GLInterface\WGL.cpp" />
<ClCompile Include="Main.cpp" />
<ClCompile Include="MainNoGUI.cpp" />
<ClCompile Include="WXInputBase.cpp" />
@@ -170,7 +168,6 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="GLInterface\WGL.h" />
<ClInclude Include="Main.h" />
<ClInclude Include="WXInputBase.h" />
<ClInclude Include="WxUtils.h" />
+17
View File
@@ -72,6 +72,23 @@ extern "C" {
int g_saveSlot = 1;
#if defined(HAVE_X11) && HAVE_X11
// X11Utils nastiness that's only used here
namespace X11Utils {
Window XWindowFromHandle(void *Handle)
{
return GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(Handle)));
}
Display *XDisplayFromHandle(void *Handle)
{
return GDK_WINDOW_XDISPLAY(gtk_widget_get_window(GTK_WIDGET(Handle)));
}
}
#endif
CRenderFrame::CRenderFrame(wxFrame* parent, wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size, long style)
: wxFrame(parent, id, title, pos, size, style)
+1 -1
View File
@@ -28,7 +28,7 @@
#include "InputCommon/GCPadStatus.h"
#if defined(HAVE_X11) && HAVE_X11
#include "DolphinWX/X11Utils.h"
#include "VideoBackends/OGL/GLInterface/X11Utils.h"
#endif
// Class declarations
+1 -1
View File
@@ -129,7 +129,7 @@ void Host_ShowVideoConfig(void*, const std::string&, const std::string&) {}
#if HAVE_X11
#include <X11/keysym.h>
#include "DolphinWX/X11Utils.h"
#include "VideoBackends/OGL/GLInterface/X11Utils.h"
class PlatformX11 : public Platform
{
+29 -3
View File
@@ -14,14 +14,40 @@ set(SRCS GLExtensions/GLExtensions.cpp
TextureConverter.cpp
VertexManager.cpp)
set(LIBS videocommon
if(USE_EGL)
set(SRCS ${SRCS} GLInterface/EGL.cpp)
if(ANDROID)
set(SRCS ${SRCS} GLInterface/EGLAndroid.cpp)
elseif(USE_X11)
set(SRCS ${SRCS} GLInterface/EGLX11.cpp)
endif()
endif()
if(WIN32)
set(SRCS ${SRCS} GLInterface/WGL.cpp)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(SRCS ${SRCS} GLInterface/AGL.cpp)
elseif(USE_X11)
if (NOT USE_EGL)
set(SRCS ${SRCS} GLInterface/GLX.cpp)
# GLX has a hard dependency on libGL.
# Make sure to link to it if using GLX.
set(LIBS ${LIBS} ${OPENGL_LIBRARIES})
endif()
set(SRCS ${SRCS} GLInterface/X11_Util.cpp GLInterface/X11Utils.cpp)
set(LIBS ${LIBS} ${XRANDR_LIBRARIES})
endif()
set(SRCS ${SRCS} GLInterface/GLInterface.cpp)
set(LIBS ${LIBS}
videocommon
SOIL
common
dl
${X11_LIBRARIES})
if(USE_EGL)
set(LIBS ${LIBS}
EGL)
set(LIBS ${LIBS} EGL)
endif()
if(wxWidgets_FOUND)
@@ -2,7 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include "DolphinWX/GLInterface/AGL.h"
#include "VideoBackends/OGL/GLInterface/AGL.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/VertexShaderManager.h"
@@ -2,8 +2,8 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include "DolphinWX/GLInterface/EGL.h"
#include "VideoBackends/OGL/GLInterfaceBase.h"
#include "VideoBackends/OGL/GLInterface/EGL.h"
#include "VideoCommon/RenderBase.h"
// Show the current FPS
@@ -3,7 +3,7 @@
// Refer to the license.txt file included.
#include "Core/Host.h"
#include "DolphinWX/GLInterface/EGLAndroid.h"
#include "VideoBackends/OGL/GLInterface/EGLAndroid.h"
EGLDisplay cInterfaceEGLAndroid::OpenDisplay()
{
@@ -4,7 +4,7 @@
#pragma once
#include "DolphinWX/GLInterface/EGL.h"
#include "VideoBackends/OGL/GLInterface/EGL.h"
class cInterfaceEGLAndroid : public cInterfaceEGL
{
@@ -2,7 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include "DolphinWX/GLInterface/EGLX11.h"
#include "VideoBackends/OGL/GLInterface/EGLX11.h"
EGLDisplay cInterfaceEGLX11::OpenDisplay()
{
@@ -6,8 +6,8 @@
#include <X11/Xlib.h>
#include "DolphinWX/GLInterface/EGL.h"
#include "DolphinWX/GLInterface/X11_Util.h"
#include "VideoBackends/OGL/GLInterface/EGL.h"
#include "VideoBackends/OGL/GLInterface/X11_Util.h"
class cInterfaceEGLX11 : public cInterfaceEGL
{
@@ -5,16 +5,16 @@
#include "VideoBackends/OGL/GLInterfaceBase.h"
#ifdef ANDROID
#include "DolphinWX/GLInterface/EGLAndroid.h"
#include "VideoBackends/OGL/GLInterface/EGLAndroid.h"
#elif defined(__APPLE__)
#include "DolphinWX/GLInterface/AGL.h"
#include "VideoBackends/OGL/GLInterface/AGL.h"
#elif defined(_WIN32)
#include "DolphinWX/GLInterface/WGL.h"
#include "VideoBackends/OGL/GLInterface/WGL.h"
#elif HAVE_X11
#if defined(USE_EGL) && USE_EGL
#include "DolphinWX/GLInterface/EGLX11.h"
#include "VideoBackends/OGL/GLInterface/EGLX11.h"
#else
#include "DolphinWX/GLInterface/GLX.h"
#include "VideoBackends/OGL/GLInterface/GLX.h"
#endif
#else
#error Platform doesnt have a GLInterface
@@ -4,7 +4,7 @@
#include <string>
#include "DolphinWX/GLInterface/GLX.h"
#include "VideoBackends/OGL/GLInterface/GLX.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/VideoConfig.h"
@@ -7,8 +7,8 @@
#include <string>
#include <GL/glx.h>
#include "DolphinWX/GLInterface/X11_Util.h"
#include "VideoBackends/OGL/GLInterfaceBase.h"
#include "VideoBackends/OGL/GLInterface/X11_Util.h"
class cInterfaceGLX : public cInterfaceBase
{
@@ -6,7 +6,7 @@
#include "Core/Host.h"
#include "DolphinWX/GLInterface/WGL.h"
#include "VideoBackends/OGL/GLInterface/WGL.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/VertexShaderManager.h"

Some files were not shown because too many files have changed in this diff Show More