diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt index ff996887a0..762e285b64 100644 --- a/Source/Core/Common/CMakeLists.txt +++ b/Source/Core/Common/CMakeLists.txt @@ -58,5 +58,40 @@ if(NOT APPLE AND NOT ANDROID) set(LIBS ${LIBS} rt) endif() +# OpenGL Interface +set(SRCS ${SRCS} + GL/GLUtil.cpp + GL/GLExtensions/GLExtensions.cpp + GL/GLInterface/GLInterface.cpp) + +if(USE_EGL) + set(SRCS ${SRCS} GL/GLInterface/EGL.cpp) + if(ANDROID) + set(SRCS ${SRCS} GL/GLInterface/EGLAndroid.cpp) + elseif(USE_X11) + set(SRCS ${SRCS} GL/GLInterface/EGLX11.cpp) + endif() + set(LIBS ${LIBS} EGL) +endif() + +if(WIN32) + set(SRCS ${SRCS} GL/GLInterface/WGL.cpp) +elseif(APPLE) + set(SRCS ${SRCS} GL/GLInterface/AGL.cpp) +elseif(USE_X11) + if (NOT USE_EGL) + set(SRCS ${SRCS} GL/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} GL/GLInterface/X11_Util.cpp) + set(LIBS ${LIBS} ${XRANDR_LIBRARIES}) +endif() + +if(NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) + set(LIBS ${LIBS} dl) +endif() + add_dolphin_library(common "${SRCS}" "${LIBS}") add_executable(traversal_server TraversalServer.cpp) diff --git a/Source/Core/Common/Common.vcxproj b/Source/Core/Common/Common.vcxproj index ec67edf054..fe95d75289 100644 --- a/Source/Core/Common/Common.vcxproj +++ b/Source/Core/Common/Common.vcxproj @@ -61,6 +61,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -99,6 +134,10 @@ + + + + diff --git a/Source/Core/Common/Common.vcxproj.filters b/Source/Core/Common/Common.vcxproj.filters index 64c29fb0ab..a55b5d26d6 100644 --- a/Source/Core/Common/Common.vcxproj.filters +++ b/Source/Core/Common/Common.vcxproj.filters @@ -7,6 +7,15 @@ {c54973ce-5723-491c-ac23-41cea3565b05} + + {3bcf0d33-06a7-4eb6-bf2d-bc5273f551a3} + + + {79bb235a-a0ea-42e2-af6e-532088e5e253} + + + {c1d6f1fe-5ec5-406d-84f2-ed64d733d2c3} + @@ -74,6 +83,111 @@ + + GL + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLExtensions + + + GL\GLInterface + + + GL\GLInterface + @@ -122,6 +236,18 @@ Logging + + GL + + + GL\GLExtensions + + + GL\GLInterface + + + GL\GLInterface + diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_ES2_compatibility.h b/Source/Core/Common/GL/GLExtensions/ARB_ES2_compatibility.h similarity index 87% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_ES2_compatibility.h rename to Source/Core/Common/GL/GLExtensions/ARB_ES2_compatibility.h index bdd8e6ad1f..10b368dc07 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_ES2_compatibility.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_ES2_compatibility.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLCLEARDEPTHFPROC glClearDepthf; extern PFNGLDEPTHRANGEFPROC glDepthRangef; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_blend_func_extended.h b/Source/Core/Common/GL/GLExtensions/ARB_blend_func_extended.h similarity index 81% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_blend_func_extended.h rename to Source/Core/Common/GL/GLExtensions/ARB_blend_func_extended.h index 5cd5636488..2b1d7c34e9 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_blend_func_extended.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_blend_func_extended.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glBindFragDataLocationIndexed; extern PFNGLGETFRAGDATAINDEXPROC glGetFragDataIndex; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_buffer_storage.h b/Source/Core/Common/GL/GLExtensions/ARB_buffer_storage.h similarity index 80% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_buffer_storage.h rename to Source/Core/Common/GL/GLExtensions/ARB_buffer_storage.h index c1330ab26d..fe8f9b6826 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_buffer_storage.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_buffer_storage.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLBUFFERSTORAGEPROC glBufferStorage; extern PFNGLNAMEDBUFFERSTORAGEEXTPROC glNamedBufferStorageEXT; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_clip_control.h b/Source/Core/Common/GL/GLExtensions/ARB_clip_control.h similarity index 74% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_clip_control.h rename to Source/Core/Common/GL/GLExtensions/ARB_clip_control.h index c2b8c940be..512d562eba 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_clip_control.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_clip_control.h @@ -2,7 +2,7 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLCLIPCONTROLPROC glClipControl; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_copy_image.h b/Source/Core/Common/GL/GLExtensions/ARB_copy_image.h similarity index 89% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_copy_image.h rename to Source/Core/Common/GL/GLExtensions/ARB_copy_image.h index 2ff3d9472c..1a6c9410e6 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_copy_image.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_copy_image.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" typedef void (GLAPIENTRY * PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_debug_output.h b/Source/Core/Common/GL/GLExtensions/ARB_debug_output.h similarity index 87% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_debug_output.h rename to Source/Core/Common/GL/GLExtensions/ARB_debug_output.h index a4451a0a83..2bb3ae68c5 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_debug_output.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_debug_output.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB; extern PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControlARB; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_draw_elements_base_vertex.h b/Source/Core/Common/GL/GLExtensions/ARB_draw_elements_base_vertex.h similarity index 88% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_draw_elements_base_vertex.h rename to Source/Core/Common/GL/GLExtensions/ARB_draw_elements_base_vertex.h index 063fb9f0f2..57235ecee0 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_draw_elements_base_vertex.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_draw_elements_base_vertex.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLDRAWELEMENTSBASEVERTEXPROC glDrawElementsBaseVertex; extern PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glDrawElementsInstancedBaseVertex; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_framebuffer_object.h b/Source/Core/Common/GL/GLExtensions/ARB_framebuffer_object.h similarity index 96% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_framebuffer_object.h rename to Source/Core/Common/GL/GLExtensions/ARB_framebuffer_object.h index 70b5476f5d..dcdecd5c82 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_framebuffer_object.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_framebuffer_object.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer; extern PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_get_program_binary.h b/Source/Core/Common/GL/GLExtensions/ARB_get_program_binary.h similarity index 83% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_get_program_binary.h rename to Source/Core/Common/GL/GLExtensions/ARB_get_program_binary.h index 57745ed728..bade5fdd54 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_get_program_binary.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_get_program_binary.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLGETPROGRAMBINARYPROC glGetProgramBinary; extern PFNGLPROGRAMBINARYPROC glProgramBinary; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_map_buffer_range.h b/Source/Core/Common/GL/GLExtensions/ARB_map_buffer_range.h similarity index 80% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_map_buffer_range.h rename to Source/Core/Common/GL/GLExtensions/ARB_map_buffer_range.h index 2a9cde1d4b..d62deecc91 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_map_buffer_range.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_map_buffer_range.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange; extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_sample_shading.h b/Source/Core/Common/GL/GLExtensions/ARB_sample_shading.h similarity index 75% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_sample_shading.h rename to Source/Core/Common/GL/GLExtensions/ARB_sample_shading.h index 21ec073fc0..40eea8b94d 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_sample_shading.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_sample_shading.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLMINSAMPLESHADINGARBPROC glMinSampleShading; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_sampler_objects.h b/Source/Core/Common/GL/GLExtensions/ARB_sampler_objects.h similarity index 94% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_sampler_objects.h rename to Source/Core/Common/GL/GLExtensions/ARB_sampler_objects.h index b4d0f19f7e..aac0acfa0f 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_sampler_objects.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_sampler_objects.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLBINDSAMPLERPROC glBindSampler; extern PFNGLDELETESAMPLERSPROC glDeleteSamplers; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_sync.h b/Source/Core/Common/GL/GLExtensions/ARB_sync.h similarity index 88% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_sync.h rename to Source/Core/Common/GL/GLExtensions/ARB_sync.h index 6496db3594..9bad10fe46 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_sync.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_sync.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLCLIENTWAITSYNCPROC glClientWaitSync; extern PFNGLDELETESYNCPROC glDeleteSync; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_texture_multisample.h b/Source/Core/Common/GL/GLExtensions/ARB_texture_multisample.h similarity index 86% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_texture_multisample.h rename to Source/Core/Common/GL/GLExtensions/ARB_texture_multisample.h index 2001fc2423..6fa1cc7e90 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_texture_multisample.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_texture_multisample.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample; extern PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_texture_storage_multisample.h b/Source/Core/Common/GL/GLExtensions/ARB_texture_storage_multisample.h similarity index 91% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_texture_storage_multisample.h rename to Source/Core/Common/GL/GLExtensions/ARB_texture_storage_multisample.h index 380dd9e439..dc52334120 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_texture_storage_multisample.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_texture_storage_multisample.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" typedef void (*PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); typedef void (*PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_uniform_buffer_object.h b/Source/Core/Common/GL/GLExtensions/ARB_uniform_buffer_object.h similarity index 92% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_uniform_buffer_object.h rename to Source/Core/Common/GL/GLExtensions/ARB_uniform_buffer_object.h index 69d6796957..088379a81c 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_uniform_buffer_object.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_uniform_buffer_object.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLBINDBUFFERBASEPROC glBindBufferBase; extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_vertex_array_object.h b/Source/Core/Common/GL/GLExtensions/ARB_vertex_array_object.h similarity index 85% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_vertex_array_object.h rename to Source/Core/Common/GL/GLExtensions/ARB_vertex_array_object.h index 0d71a6923c..2e5e41ea02 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_vertex_array_object.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_vertex_array_object.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray; extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_viewport_array.h b/Source/Core/Common/GL/GLExtensions/ARB_viewport_array.h similarity index 91% rename from Source/Core/VideoBackends/OGL/GLExtensions/ARB_viewport_array.h rename to Source/Core/Common/GL/GLExtensions/ARB_viewport_array.h index 73268b180e..fd80762b85 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/ARB_viewport_array.h +++ b/Source/Core/Common/GL/GLExtensions/ARB_viewport_array.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLDEPTHRANGEARRAYVPROC glDepthRangeArrayv; extern PFNGLDEPTHRANGEINDEXEDPROC glDepthRangeIndexed; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp b/Source/Core/Common/GL/GLExtensions/GLExtensions.cpp similarity index 99% rename from Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp rename to Source/Core/Common/GL/GLExtensions/GLExtensions.cpp index 1bee9a2ea3..8831032df6 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp +++ b/Source/Core/Common/GL/GLExtensions/GLExtensions.cpp @@ -5,9 +5,10 @@ #include #include +#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLExtensions/GLExtensions.h" #include "Common/Logging/Log.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" -#include "VideoBackends/OGL/GLExtensions/GLExtensions.h" + #if defined(__linux__) || defined(__APPLE__) #include diff --git a/Source/Core/Common/GL/GLExtensions/GLExtensions.h b/Source/Core/Common/GL/GLExtensions/GLExtensions.h new file mode 100644 index 0000000000..eb80b1f6d1 --- /dev/null +++ b/Source/Core/Common/GL/GLExtensions/GLExtensions.h @@ -0,0 +1,51 @@ +// Copyright 2013 Dolphin Emulator Project +// Licensed under GPLv2+ +// Refer to the license.txt file included. + +#include + +#include "Common/CommonTypes.h" + +#include "Common/GL/GLExtensions/ARB_blend_func_extended.h" +#include "Common/GL/GLExtensions/ARB_buffer_storage.h" +#include "Common/GL/GLExtensions/ARB_clip_control.h" +#include "Common/GL/GLExtensions/ARB_copy_image.h" +#include "Common/GL/GLExtensions/ARB_debug_output.h" +#include "Common/GL/GLExtensions/ARB_draw_elements_base_vertex.h" +#include "Common/GL/GLExtensions/ARB_ES2_compatibility.h" +#include "Common/GL/GLExtensions/ARB_framebuffer_object.h" +#include "Common/GL/GLExtensions/ARB_get_program_binary.h" +#include "Common/GL/GLExtensions/ARB_map_buffer_range.h" +#include "Common/GL/GLExtensions/ARB_sample_shading.h" +#include "Common/GL/GLExtensions/ARB_sampler_objects.h" +#include "Common/GL/GLExtensions/ARB_sync.h" +#include "Common/GL/GLExtensions/ARB_texture_multisample.h" +#include "Common/GL/GLExtensions/ARB_texture_storage_multisample.h" +#include "Common/GL/GLExtensions/ARB_uniform_buffer_object.h" +#include "Common/GL/GLExtensions/ARB_vertex_array_object.h" +#include "Common/GL/GLExtensions/ARB_viewport_array.h" +#include "Common/GL/GLExtensions/gl_1_1.h" +#include "Common/GL/GLExtensions/gl_1_2.h" +#include "Common/GL/GLExtensions/gl_1_3.h" +#include "Common/GL/GLExtensions/gl_1_4.h" +#include "Common/GL/GLExtensions/gl_1_5.h" +#include "Common/GL/GLExtensions/gl_2_0.h" +#include "Common/GL/GLExtensions/gl_3_0.h" +#include "Common/GL/GLExtensions/gl_3_1.h" +#include "Common/GL/GLExtensions/gl_3_2.h" +#include "Common/GL/GLExtensions/KHR_debug.h" +#include "Common/GL/GLExtensions/NV_occlusion_query_samples.h" +#include "Common/GL/GLExtensions/NV_primitive_restart.h" + +namespace GLExtensions +{ + // Initializes the interface + bool Init(); + + // Function for checking if the hardware supports an extension + // example: if (GLExtensions::Supports("GL_ARB_multi_map")) + bool Supports(const std::string& name); + + // Returns OpenGL version in format 430 + u32 Version(); +} diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/KHR_debug.h b/Source/Core/Common/GL/GLExtensions/KHR_debug.h similarity index 98% rename from Source/Core/VideoBackends/OGL/GLExtensions/KHR_debug.h rename to Source/Core/Common/GL/GLExtensions/KHR_debug.h index 375b42a1cf..777930cd3b 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/KHR_debug.h +++ b/Source/Core/Common/GL/GLExtensions/KHR_debug.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" #ifndef GL_VERSION_4_3 diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/NV_occlusion_query_samples.h b/Source/Core/Common/GL/GLExtensions/NV_occlusion_query_samples.h similarity index 91% rename from Source/Core/VideoBackends/OGL/GLExtensions/NV_occlusion_query_samples.h rename to Source/Core/Common/GL/GLExtensions/NV_occlusion_query_samples.h index f57e622c83..0a050b83b0 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/NV_occlusion_query_samples.h +++ b/Source/Core/Common/GL/GLExtensions/NV_occlusion_query_samples.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLGENOCCLUSIONQUERIESNVPROC glGenOcclusionQueriesNV; extern PFNGLDELETEOCCLUSIONQUERIESNVPROC glDeleteOcclusionQueriesNV; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/NV_primitive_restart.h b/Source/Core/Common/GL/GLExtensions/NV_primitive_restart.h similarity index 89% rename from Source/Core/VideoBackends/OGL/GLExtensions/NV_primitive_restart.h rename to Source/Core/Common/GL/GLExtensions/NV_primitive_restart.h index 9b72621a3b..c23322f84f 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/NV_primitive_restart.h +++ b/Source/Core/Common/GL/GLExtensions/NV_primitive_restart.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" #define GL_PRIMITIVE_RESTART_NV 0x8558 #define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_1_1.h b/Source/Core/Common/GL/GLExtensions/gl_1_1.h similarity index 99% rename from Source/Core/VideoBackends/OGL/GLExtensions/gl_1_1.h rename to Source/Core/Common/GL/GLExtensions/gl_1_1.h index 7482acc281..14f7b25702 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/gl_1_1.h +++ b/Source/Core/Common/GL/GLExtensions/gl_1_1.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" typedef void (GLAPIENTRY * PFNGLCLEARINDEXPROC) ( GLfloat c ); typedef void (GLAPIENTRY * PFNGLCLEARCOLORPROC) ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_1_2.h b/Source/Core/Common/GL/GLExtensions/gl_1_2.h similarity index 85% rename from Source/Core/VideoBackends/OGL/GLExtensions/gl_1_2.h rename to Source/Core/Common/GL/GLExtensions/gl_1_2.h index 8b863cc6d7..835179c1fd 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/gl_1_2.h +++ b/Source/Core/Common/GL/GLExtensions/gl_1_2.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D; extern PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_1_3.h b/Source/Core/Common/GL/GLExtensions/gl_1_3.h similarity index 98% rename from Source/Core/VideoBackends/OGL/GLExtensions/gl_1_3.h rename to Source/Core/Common/GL/GLExtensions/gl_1_3.h index 7a4c4b853c..62715a8b48 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/gl_1_3.h +++ b/Source/Core/Common/GL/GLExtensions/gl_1_3.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLACTIVETEXTUREARBPROC glActiveTexture; extern PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTexture; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_1_4.h b/Source/Core/Common/GL/GLExtensions/gl_1_4.h similarity index 97% rename from Source/Core/VideoBackends/OGL/GLExtensions/gl_1_4.h rename to Source/Core/Common/GL/GLExtensions/gl_1_4.h index 079b6db0a1..a956912051 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/gl_1_4.h +++ b/Source/Core/Common/GL/GLExtensions/gl_1_4.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" // These two are provided by ARB_imaging as well extern PFNGLBLENDCOLORPROC glBlendColor; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_1_5.h b/Source/Core/Common/GL/GLExtensions/gl_1_5.h similarity index 94% rename from Source/Core/VideoBackends/OGL/GLExtensions/gl_1_5.h rename to Source/Core/Common/GL/GLExtensions/gl_1_5.h index d3b427e720..b81cb33712 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/gl_1_5.h +++ b/Source/Core/Common/GL/GLExtensions/gl_1_5.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLBEGINQUERYPROC glBeginQuery; extern PFNGLBINDBUFFERPROC glBindBuffer; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_2_0.h b/Source/Core/Common/GL/GLExtensions/gl_2_0.h similarity index 98% rename from Source/Core/VideoBackends/OGL/GLExtensions/gl_2_0.h rename to Source/Core/Common/GL/GLExtensions/gl_2_0.h index eae864462b..aa71e343e5 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/gl_2_0.h +++ b/Source/Core/Common/GL/GLExtensions/gl_2_0.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLATTACHSHADERPROC glAttachShader; extern PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_3_0.h b/Source/Core/Common/GL/GLExtensions/gl_3_0.h similarity index 98% rename from Source/Core/VideoBackends/OGL/GLExtensions/gl_3_0.h rename to Source/Core/Common/GL/GLExtensions/gl_3_0.h index 9e26d763ee..5c06da496c 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/gl_3_0.h +++ b/Source/Core/Common/GL/GLExtensions/gl_3_0.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLBEGINCONDITIONALRENDERPROC glBeginConditionalRender; extern PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_3_1.h b/Source/Core/Common/GL/GLExtensions/gl_3_1.h similarity index 86% rename from Source/Core/VideoBackends/OGL/GLExtensions/gl_3_1.h rename to Source/Core/Common/GL/GLExtensions/gl_3_1.h index 9cc9244706..8d1935262b 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/gl_3_1.h +++ b/Source/Core/Common/GL/GLExtensions/gl_3_1.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced; extern PFNGLDRAWELEMENTSINSTANCEDPROC glDrawElementsInstanced; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_3_2.h b/Source/Core/Common/GL/GLExtensions/gl_3_2.h similarity index 84% rename from Source/Core/VideoBackends/OGL/GLExtensions/gl_3_2.h rename to Source/Core/Common/GL/GLExtensions/gl_3_2.h index f535cc6805..5d767556cc 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/gl_3_2.h +++ b/Source/Core/Common/GL/GLExtensions/gl_3_2.h @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLExtensions/gl_common.h" +#include "Common/GL/GLExtensions/gl_common.h" extern PFNGLFRAMEBUFFERTEXTUREPROC glFramebufferTexture; extern PFNGLGETBUFFERPARAMETERI64VPROC glGetBufferParameteri64v; diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_common.h b/Source/Core/Common/GL/GLExtensions/gl_common.h similarity index 100% rename from Source/Core/VideoBackends/OGL/GLExtensions/gl_common.h rename to Source/Core/Common/GL/GLExtensions/gl_common.h diff --git a/Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp b/Source/Core/Common/GL/GLInterface/AGL.cpp similarity index 98% rename from Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp rename to Source/Core/Common/GL/GLInterface/AGL.cpp index 62286cb956..69783800dc 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp +++ b/Source/Core/Common/GL/GLInterface/AGL.cpp @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLInterface/AGL.h" +#include "Common/GL/GLInterface/AGL.h" #include "VideoCommon/RenderBase.h" #include "VideoCommon/VertexShaderManager.h" diff --git a/Source/Core/VideoBackends/OGL/GLInterface/AGL.h b/Source/Core/Common/GL/GLInterface/AGL.h similarity index 90% rename from Source/Core/VideoBackends/OGL/GLInterface/AGL.h rename to Source/Core/Common/GL/GLInterface/AGL.h index 4e453aab29..b08b7ec802 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/AGL.h +++ b/Source/Core/Common/GL/GLInterface/AGL.h @@ -8,7 +8,7 @@ #import #endif -#include "VideoBackends/OGL/GLInterfaceBase.h" +#include "Common/GL/GLInterfaceBase.h" class cInterfaceAGL : public cInterfaceBase { diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp b/Source/Core/Common/GL/GLInterface/EGL.cpp similarity index 98% rename from Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp rename to Source/Core/Common/GL/GLInterface/EGL.cpp index 43c399e8ba..c094b9eae5 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp +++ b/Source/Core/Common/GL/GLInterface/EGL.cpp @@ -2,8 +2,8 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLInterfaceBase.h" -#include "VideoBackends/OGL/GLInterface/EGL.h" +#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLInterface/EGL.h" #include "VideoCommon/DriverDetails.h" #include "VideoCommon/RenderBase.h" diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGL.h b/Source/Core/Common/GL/GLInterface/EGL.h similarity index 94% rename from Source/Core/VideoBackends/OGL/GLInterface/EGL.h rename to Source/Core/Common/GL/GLInterface/EGL.h index d1b78d5e5c..02a962d613 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/EGL.h +++ b/Source/Core/Common/GL/GLInterface/EGL.h @@ -7,8 +7,8 @@ #include #include +#include "Common/GL/GLInterfaceBase.h" #include "Core/ConfigManager.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" class cInterfaceEGL : public cInterfaceBase { diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.cpp b/Source/Core/Common/GL/GLInterface/EGLAndroid.cpp similarity index 93% rename from Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.cpp rename to Source/Core/Common/GL/GLInterface/EGLAndroid.cpp index 46ceaa9371..023ba9b901 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.cpp +++ b/Source/Core/Common/GL/GLInterface/EGLAndroid.cpp @@ -2,8 +2,8 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "Common/GL/GLInterface/EGLAndroid.h" #include "Core/Host.h" -#include "VideoBackends/OGL/GLInterface/EGLAndroid.h" EGLDisplay cInterfaceEGLAndroid::OpenDisplay() { diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.h b/Source/Core/Common/GL/GLInterface/EGLAndroid.h similarity index 88% rename from Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.h rename to Source/Core/Common/GL/GLInterface/EGLAndroid.h index 4167c3d21d..7f3ede889c 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.h +++ b/Source/Core/Common/GL/GLInterface/EGLAndroid.h @@ -4,7 +4,7 @@ #pragma once -#include "VideoBackends/OGL/GLInterface/EGL.h" +#include "Common/GL/GLInterface/EGL.h" class cInterfaceEGLAndroid : public cInterfaceEGL { diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGLX11.cpp b/Source/Core/Common/GL/GLInterface/EGLX11.cpp similarity index 95% rename from Source/Core/VideoBackends/OGL/GLInterface/EGLX11.cpp rename to Source/Core/Common/GL/GLInterface/EGLX11.cpp index e4e5b1c7f3..3859a23706 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/EGLX11.cpp +++ b/Source/Core/Common/GL/GLInterface/EGLX11.cpp @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLInterface/EGLX11.h" +#include "Common/GL/GLInterface/EGLX11.h" EGLDisplay cInterfaceEGLX11::OpenDisplay() { diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGLX11.h b/Source/Core/Common/GL/GLInterface/EGLX11.h similarity index 81% rename from Source/Core/VideoBackends/OGL/GLInterface/EGLX11.h rename to Source/Core/Common/GL/GLInterface/EGLX11.h index 15d37ae87f..58841fa7f9 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/EGLX11.h +++ b/Source/Core/Common/GL/GLInterface/EGLX11.h @@ -6,8 +6,8 @@ #include -#include "VideoBackends/OGL/GLInterface/EGL.h" -#include "VideoBackends/OGL/GLInterface/X11_Util.h" +#include "Common/GL/GLInterface/EGL.h" +#include "Common/GL/GLInterface/X11_Util.h" class cInterfaceEGLX11 : public cInterfaceEGL { diff --git a/Source/Core/VideoBackends/OGL/GLInterface/GLInterface.cpp b/Source/Core/Common/GL/GLInterface/GLInterface.cpp similarity index 69% rename from Source/Core/VideoBackends/OGL/GLInterface/GLInterface.cpp rename to Source/Core/Common/GL/GLInterface/GLInterface.cpp index 525055aaa8..8abe67dc71 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/GLInterface.cpp +++ b/Source/Core/Common/GL/GLInterface/GLInterface.cpp @@ -2,19 +2,19 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLInterfaceBase.h" +#include "Common/GL/GLInterfaceBase.h" #ifdef ANDROID -#include "VideoBackends/OGL/GLInterface/EGLAndroid.h" +#include "Common/GL/GLInterface/EGLAndroid.h" #elif defined(__APPLE__) -#include "VideoBackends/OGL/GLInterface/AGL.h" +#include "Common/GL/GLInterface/AGL.h" #elif defined(_WIN32) -#include "VideoBackends/OGL/GLInterface/WGL.h" +#include "Common/GL/GLInterface/WGL.h" #elif HAVE_X11 #if defined(USE_EGL) && USE_EGL -#include "VideoBackends/OGL/GLInterface/EGLX11.h" +#include "Common/GL/GLInterface/EGLX11.h" #else -#include "VideoBackends/OGL/GLInterface/GLX.h" +#include "Common/GL/GLInterface/GLX.h" #endif #else #error Platform doesnt have a GLInterface diff --git a/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp b/Source/Core/Common/GL/GLInterface/GLX.cpp similarity index 99% rename from Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp rename to Source/Core/Common/GL/GLInterface/GLX.cpp index 2d22ab7101..8478f31aca 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp +++ b/Source/Core/Common/GL/GLInterface/GLX.cpp @@ -4,7 +4,7 @@ #include -#include "VideoBackends/OGL/GLInterface/GLX.h" +#include "Common/GL/GLInterface/GLX.h" #include "VideoCommon/RenderBase.h" #include "VideoCommon/VideoConfig.h" diff --git a/Source/Core/VideoBackends/OGL/GLInterface/GLX.h b/Source/Core/Common/GL/GLInterface/GLX.h similarity index 86% rename from Source/Core/VideoBackends/OGL/GLInterface/GLX.h rename to Source/Core/Common/GL/GLInterface/GLX.h index d1431f9112..35deb33b6a 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/GLX.h +++ b/Source/Core/Common/GL/GLInterface/GLX.h @@ -7,8 +7,8 @@ #include #include -#include "VideoBackends/OGL/GLInterfaceBase.h" -#include "VideoBackends/OGL/GLInterface/X11_Util.h" +#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLInterface/X11_Util.h" class cInterfaceGLX : public cInterfaceBase { diff --git a/Source/Core/VideoBackends/OGL/GLInterface/WGL.cpp b/Source/Core/Common/GL/GLInterface/WGL.cpp similarity index 99% rename from Source/Core/VideoBackends/OGL/GLInterface/WGL.cpp rename to Source/Core/Common/GL/GLInterface/WGL.cpp index 27f36e617d..c8d0ccce0d 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/WGL.cpp +++ b/Source/Core/Common/GL/GLInterface/WGL.cpp @@ -4,9 +4,9 @@ #include -#include "Core/Host.h" +#include "Common/GL/GLInterface/WGL.h" -#include "VideoBackends/OGL/GLInterface/WGL.h" +#include "Core/Host.h" #include "VideoCommon/RenderBase.h" #include "VideoCommon/VertexShaderManager.h" diff --git a/Source/Core/VideoBackends/OGL/GLInterface/WGL.h b/Source/Core/Common/GL/GLInterface/WGL.h similarity index 90% rename from Source/Core/VideoBackends/OGL/GLInterface/WGL.h rename to Source/Core/Common/GL/GLInterface/WGL.h index 4382a0cf9a..6a1b8c133e 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/WGL.h +++ b/Source/Core/Common/GL/GLInterface/WGL.h @@ -5,7 +5,7 @@ #pragma once #include -#include "VideoBackends/OGL/GLInterfaceBase.h" +#include "Common/GL/GLInterfaceBase.h" class cInterfaceWGL : public cInterfaceBase { diff --git a/Source/Core/VideoBackends/OGL/GLInterface/X11_Util.cpp b/Source/Core/Common/GL/GLInterface/X11_Util.cpp similarity index 94% rename from Source/Core/VideoBackends/OGL/GLInterface/X11_Util.cpp rename to Source/Core/Common/GL/GLInterface/X11_Util.cpp index 1577df5220..3956f6a0e2 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/X11_Util.cpp +++ b/Source/Core/Common/GL/GLInterface/X11_Util.cpp @@ -3,9 +3,11 @@ // Refer to the license.txt file included. #include "Common/Thread.h" +#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLInterface/X11_Util.h" + #include "Core/Host.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" -#include "VideoBackends/OGL/GLInterface/X11_Util.h" + #include "VideoCommon/VideoConfig.h" void cX11Window::Initialize(Display *_dpy) diff --git a/Source/Core/VideoBackends/OGL/GLInterface/X11_Util.h b/Source/Core/Common/GL/GLInterface/X11_Util.h similarity index 100% rename from Source/Core/VideoBackends/OGL/GLInterface/X11_Util.h rename to Source/Core/Common/GL/GLInterface/X11_Util.h diff --git a/Source/Core/VideoBackends/OGL/GLInterfaceBase.h b/Source/Core/Common/GL/GLInterfaceBase.h similarity index 100% rename from Source/Core/VideoBackends/OGL/GLInterfaceBase.h rename to Source/Core/Common/GL/GLInterfaceBase.h diff --git a/Source/Core/VideoBackends/OGL/GLUtil.cpp b/Source/Core/Common/GL/GLUtil.cpp similarity index 98% rename from Source/Core/VideoBackends/OGL/GLUtil.cpp rename to Source/Core/Common/GL/GLUtil.cpp index eff7451788..30530f4aa8 100644 --- a/Source/Core/VideoBackends/OGL/GLUtil.cpp +++ b/Source/Core/Common/GL/GLUtil.cpp @@ -4,12 +4,12 @@ #include "Common/IniFile.h" #include "Common/StringUtil.h" +#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLUtil.h" #include "Core/ConfigManager.h" #include "Core/Core.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" -#include "VideoBackends/OGL/GLUtil.h" #include "VideoBackends/OGL/Render.h" #include "VideoBackends/OGL/VideoBackend.h" diff --git a/Source/Core/VideoBackends/OGL/GLUtil.h b/Source/Core/Common/GL/GLUtil.h similarity index 89% rename from Source/Core/VideoBackends/OGL/GLUtil.h rename to Source/Core/Common/GL/GLUtil.h index 8c0eb27ac6..73b8dfd2c4 100644 --- a/Source/Core/VideoBackends/OGL/GLUtil.h +++ b/Source/Core/Common/GL/GLUtil.h @@ -5,8 +5,7 @@ #pragma once #include "Common/MathUtil.h" -#include "VideoBackends/OGL/GLExtensions/GLExtensions.h" -#include "VideoCommon/VideoConfig.h" +#include "Common/GL/GLExtensions/GLExtensions.h" #ifndef _WIN32 diff --git a/Source/Core/VideoBackends/OGL/BoundingBox.cpp b/Source/Core/VideoBackends/OGL/BoundingBox.cpp index 91fedb2a2d..b8e424f639 100644 --- a/Source/Core/VideoBackends/OGL/BoundingBox.cpp +++ b/Source/Core/VideoBackends/OGL/BoundingBox.cpp @@ -2,8 +2,9 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "Common/GL/GLUtil.h" + #include "VideoBackends/OGL/BoundingBox.h" -#include "VideoBackends/OGL/GLUtil.h" #include "VideoCommon/VideoConfig.h" diff --git a/Source/Core/VideoBackends/OGL/CMakeLists.txt b/Source/Core/VideoBackends/OGL/CMakeLists.txt index b4ece69de1..2927253d30 100644 --- a/Source/Core/VideoBackends/OGL/CMakeLists.txt +++ b/Source/Core/VideoBackends/OGL/CMakeLists.txt @@ -1,7 +1,6 @@ -set(SRCS GLExtensions/GLExtensions.cpp +set(SRCS BoundingBox.cpp FramebufferManager.cpp - GLUtil.cpp main.cpp NativeVertexFormat.cpp PerfQuery.cpp @@ -15,43 +14,11 @@ set(SRCS GLExtensions/GLExtensions.cpp TextureConverter.cpp VertexManager.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(APPLE) - 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) - set(LIBS ${LIBS} ${XRANDR_LIBRARIES}) -endif() - -set(SRCS ${SRCS} GLInterface/GLInterface.cpp) - set(LIBS ${LIBS} videocommon SOIL common ${X11_LIBRARIES}) -if(NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) - set(LIBS ${LIBS} dl) -endif() -if(USE_EGL) - set(LIBS ${LIBS} EGL) -endif() if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD") set(LIBS ${LIBS} usbhid) diff --git a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp index 00e54967f8..9c00b3b838 100644 --- a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp +++ b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp @@ -3,10 +3,10 @@ // Refer to the license.txt file included. #include "Common/CommonFuncs.h" +#include "Common/GL/GLInterfaceBase.h" #include "Core/HW/Memmap.h" #include "VideoBackends/OGL/FramebufferManager.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" #include "VideoBackends/OGL/Render.h" #include "VideoBackends/OGL/SamplerCache.h" #include "VideoBackends/OGL/TextureConverter.h" diff --git a/Source/Core/VideoBackends/OGL/FramebufferManager.h b/Source/Core/VideoBackends/OGL/FramebufferManager.h index d0aa6a2c18..a1d2895562 100644 --- a/Source/Core/VideoBackends/OGL/FramebufferManager.h +++ b/Source/Core/VideoBackends/OGL/FramebufferManager.h @@ -4,7 +4,8 @@ #pragma once -#include "VideoBackends/OGL/GLUtil.h" +#include "Common/GL/GLUtil.h" + #include "VideoBackends/OGL/ProgramShaderCache.h" #include "VideoBackends/OGL/Render.h" diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.h b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.h deleted file mode 100644 index feb8a53a48..0000000000 --- a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2013 Dolphin Emulator Project -// Licensed under GPLv2+ -// Refer to the license.txt file included. - -#include - -#include "Common/CommonTypes.h" - -#include "VideoBackends/OGL/GLExtensions/ARB_blend_func_extended.h" -#include "VideoBackends/OGL/GLExtensions/ARB_buffer_storage.h" -#include "VideoBackends/OGL/GLExtensions/ARB_clip_control.h" -#include "VideoBackends/OGL/GLExtensions/ARB_copy_image.h" -#include "VideoBackends/OGL/GLExtensions/ARB_debug_output.h" -#include "VideoBackends/OGL/GLExtensions/ARB_draw_elements_base_vertex.h" -#include "VideoBackends/OGL/GLExtensions/ARB_ES2_compatibility.h" -#include "VideoBackends/OGL/GLExtensions/ARB_framebuffer_object.h" -#include "VideoBackends/OGL/GLExtensions/ARB_get_program_binary.h" -#include "VideoBackends/OGL/GLExtensions/ARB_map_buffer_range.h" -#include "VideoBackends/OGL/GLExtensions/ARB_sample_shading.h" -#include "VideoBackends/OGL/GLExtensions/ARB_sampler_objects.h" -#include "VideoBackends/OGL/GLExtensions/ARB_sync.h" -#include "VideoBackends/OGL/GLExtensions/ARB_texture_multisample.h" -#include "VideoBackends/OGL/GLExtensions/ARB_texture_storage_multisample.h" -#include "VideoBackends/OGL/GLExtensions/ARB_uniform_buffer_object.h" -#include "VideoBackends/OGL/GLExtensions/ARB_vertex_array_object.h" -#include "VideoBackends/OGL/GLExtensions/ARB_viewport_array.h" -#include "VideoBackends/OGL/GLExtensions/gl_1_1.h" -#include "VideoBackends/OGL/GLExtensions/gl_1_2.h" -#include "VideoBackends/OGL/GLExtensions/gl_1_3.h" -#include "VideoBackends/OGL/GLExtensions/gl_1_4.h" -#include "VideoBackends/OGL/GLExtensions/gl_1_5.h" -#include "VideoBackends/OGL/GLExtensions/gl_2_0.h" -#include "VideoBackends/OGL/GLExtensions/gl_3_0.h" -#include "VideoBackends/OGL/GLExtensions/gl_3_1.h" -#include "VideoBackends/OGL/GLExtensions/gl_3_2.h" -#include "VideoBackends/OGL/GLExtensions/KHR_debug.h" -#include "VideoBackends/OGL/GLExtensions/NV_occlusion_query_samples.h" -#include "VideoBackends/OGL/GLExtensions/NV_primitive_restart.h" - -namespace GLExtensions -{ - // Initializes the interface - bool Init(); - - // Function for checking if the hardware supports an extension - // example: if (GLExtensions::Supports("GL_ARB_multi_map")) - bool Supports(const std::string& name); - - // Returns OpenGL version in format 430 - u32 Version(); -} diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index de0eb4f10d..a64133834c 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -5,8 +5,8 @@ #include "Common/MemoryUtil.h" #include "Common/x64ABI.h" #include "Common/x64Emitter.h" +#include "Common/GL/GLUtil.h" -#include "VideoBackends/OGL/GLUtil.h" #include "VideoBackends/OGL/ProgramShaderCache.h" #include "VideoBackends/OGL/VertexManager.h" diff --git a/Source/Core/VideoBackends/OGL/OGL.vcxproj b/Source/Core/VideoBackends/OGL/OGL.vcxproj index 820f5b6219..1d6a639d87 100644 --- a/Source/Core/VideoBackends/OGL/OGL.vcxproj +++ b/Source/Core/VideoBackends/OGL/OGL.vcxproj @@ -37,10 +37,6 @@ - - - - @@ -57,37 +53,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -115,4 +80,4 @@ - \ No newline at end of file + diff --git a/Source/Core/VideoBackends/OGL/OGL.vcxproj.filters b/Source/Core/VideoBackends/OGL/OGL.vcxproj.filters index e176e3f92f..6cd9a67466 100644 --- a/Source/Core/VideoBackends/OGL/OGL.vcxproj.filters +++ b/Source/Core/VideoBackends/OGL/OGL.vcxproj.filters @@ -13,12 +13,6 @@ {696df73b-378e-4399-8f21-999b65d78dcd} - - {4366f285-ded5-48c9-9464-03fb46174526} - - - {1734a626-f6e2-41b1-8753-43447bed39af} - @@ -27,9 +21,6 @@ Decoder - - GLUtil - GLUtil @@ -62,23 +53,11 @@ - - GLExtensions - - - GLInterface - - - GLInterface - Decoder - - GLUtil - GLUtil @@ -112,96 +91,6 @@ - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLExtensions - - - GLInterface - - - GLExtensions - diff --git a/Source/Core/VideoBackends/OGL/PerfQuery.cpp b/Source/Core/VideoBackends/OGL/PerfQuery.cpp index a34432aceb..a3e9fde0dc 100644 --- a/Source/Core/VideoBackends/OGL/PerfQuery.cpp +++ b/Source/Core/VideoBackends/OGL/PerfQuery.cpp @@ -2,8 +2,9 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLInterfaceBase.h" -#include "VideoBackends/OGL/GLUtil.h" +#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLUtil.h" + #include "VideoBackends/OGL/PerfQuery.h" #include "VideoCommon/RenderBase.h" diff --git a/Source/Core/VideoBackends/OGL/PerfQuery.h b/Source/Core/VideoBackends/OGL/PerfQuery.h index 3b16c810e7..4afd41928b 100644 --- a/Source/Core/VideoBackends/OGL/PerfQuery.h +++ b/Source/Core/VideoBackends/OGL/PerfQuery.h @@ -7,7 +7,8 @@ #include #include -#include "VideoBackends/OGL/GLExtensions/GLExtensions.h" +#include "Common/GL/GLExtensions/GLExtensions.h" + #include "VideoCommon/PerfQueryBase.h" namespace OGL diff --git a/Source/Core/VideoBackends/OGL/PostProcessing.cpp b/Source/Core/VideoBackends/OGL/PostProcessing.cpp index 64eee7a0db..a80fb69d16 100644 --- a/Source/Core/VideoBackends/OGL/PostProcessing.cpp +++ b/Source/Core/VideoBackends/OGL/PostProcessing.cpp @@ -6,8 +6,9 @@ #include "Common/FileUtil.h" #include "Common/StringUtil.h" +#include "Common/GL/GLUtil.h" + #include "VideoBackends/OGL/FramebufferManager.h" -#include "VideoBackends/OGL/GLUtil.h" #include "VideoBackends/OGL/PostProcessing.h" #include "VideoBackends/OGL/ProgramShaderCache.h" #include "VideoBackends/OGL/SamplerCache.h" diff --git a/Source/Core/VideoBackends/OGL/PostProcessing.h b/Source/Core/VideoBackends/OGL/PostProcessing.h index bfc08aa659..804232fbfd 100644 --- a/Source/Core/VideoBackends/OGL/PostProcessing.h +++ b/Source/Core/VideoBackends/OGL/PostProcessing.h @@ -7,7 +7,8 @@ #include #include -#include "VideoBackends/OGL/GLUtil.h" +#include "Common/GL/GLUtil.h" + #include "VideoBackends/OGL/ProgramShaderCache.h" #include "VideoCommon/PostProcessing.h" diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h index c5013b4c1e..507ec0d3df 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h @@ -5,8 +5,10 @@ #pragma once #include "Common/LinearDiskCache.h" +#include "Common/GL/GLUtil.h" + #include "Core/ConfigManager.h" -#include "VideoBackends/OGL/GLUtil.h" + #include "VideoCommon/GeometryShaderGen.h" #include "VideoCommon/PixelShaderGen.h" #include "VideoCommon/VertexShaderGen.h" diff --git a/Source/Core/VideoBackends/OGL/RasterFont.cpp b/Source/Core/VideoBackends/OGL/RasterFont.cpp index ebc303c9d6..71b6a358aa 100644 --- a/Source/Core/VideoBackends/OGL/RasterFont.cpp +++ b/Source/Core/VideoBackends/OGL/RasterFont.cpp @@ -4,7 +4,8 @@ #include -#include "VideoBackends/OGL/GLUtil.h" +#include "Common/GL/GLUtil.h" + #include "VideoBackends/OGL/ProgramShaderCache.h" #include "VideoBackends/OGL/RasterFont.h" diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 44f6163141..4e094f0d2c 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -17,6 +17,8 @@ #include "Common/StringUtil.h" #include "Common/Thread.h" #include "Common/Timer.h" +#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLUtil.h" #include "Common/Logging/LogManager.h" #include "Core/ConfigManager.h" @@ -24,8 +26,6 @@ #include "VideoBackends/OGL/BoundingBox.h" #include "VideoBackends/OGL/FramebufferManager.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" -#include "VideoBackends/OGL/GLUtil.h" #include "VideoBackends/OGL/main.h" #include "VideoBackends/OGL/PostProcessing.h" #include "VideoBackends/OGL/ProgramShaderCache.h" diff --git a/Source/Core/VideoBackends/OGL/SamplerCache.cpp b/Source/Core/VideoBackends/OGL/SamplerCache.cpp index 3fad7f04b0..b1f7d40fa7 100644 --- a/Source/Core/VideoBackends/OGL/SamplerCache.cpp +++ b/Source/Core/VideoBackends/OGL/SamplerCache.cpp @@ -2,9 +2,10 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "VideoBackends/OGL/GLInterfaceBase.h" +#include "Common/GL/GLInterfaceBase.h" #include "VideoBackends/OGL/SamplerCache.h" #include "VideoCommon/DriverDetails.h" +#include "VideoCommon/VideoConfig.h" namespace OGL { diff --git a/Source/Core/VideoBackends/OGL/SamplerCache.h b/Source/Core/VideoBackends/OGL/SamplerCache.h index ec469a81da..05a4836fcf 100644 --- a/Source/Core/VideoBackends/OGL/SamplerCache.h +++ b/Source/Core/VideoBackends/OGL/SamplerCache.h @@ -6,7 +6,8 @@ #include -#include "VideoBackends/OGL/GLUtil.h" +#include "Common/GL/GLUtil.h" + #include "VideoBackends/OGL/Render.h" namespace OGL diff --git a/Source/Core/VideoBackends/OGL/StreamBuffer.cpp b/Source/Core/VideoBackends/OGL/StreamBuffer.cpp index 0caa1e4589..47dfd14557 100644 --- a/Source/Core/VideoBackends/OGL/StreamBuffer.cpp +++ b/Source/Core/VideoBackends/OGL/StreamBuffer.cpp @@ -3,8 +3,8 @@ // Refer to the license.txt file included. #include "Common/MemoryUtil.h" +#include "Common/GL/GLUtil.h" -#include "VideoBackends/OGL/GLUtil.h" #include "VideoBackends/OGL/Render.h" #include "VideoBackends/OGL/StreamBuffer.h" diff --git a/Source/Core/VideoBackends/OGL/StreamBuffer.h b/Source/Core/VideoBackends/OGL/StreamBuffer.h index 2abb71c00e..ba1f78944c 100644 --- a/Source/Core/VideoBackends/OGL/StreamBuffer.h +++ b/Source/Core/VideoBackends/OGL/StreamBuffer.h @@ -5,8 +5,11 @@ #pragma once #include + +#include "Common/GL/GLUtil.h" + #include "VideoBackends/OGL/FramebufferManager.h" -#include "VideoBackends/OGL/GLUtil.h" + #include "VideoCommon/VideoCommon.h" namespace OGL diff --git a/Source/Core/VideoBackends/OGL/TextureCache.cpp b/Source/Core/VideoBackends/OGL/TextureCache.cpp index 2becd641e7..fab19a4a50 100644 --- a/Source/Core/VideoBackends/OGL/TextureCache.cpp +++ b/Source/Core/VideoBackends/OGL/TextureCache.cpp @@ -12,10 +12,11 @@ #include "Common/MemoryUtil.h" #include "Common/StringUtil.h" +#include "Common/GL/GLInterfaceBase.h" + #include "Core/HW/Memmap.h" #include "VideoBackends/OGL/FramebufferManager.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" #include "VideoBackends/OGL/ProgramShaderCache.h" #include "VideoBackends/OGL/Render.h" #include "VideoBackends/OGL/SamplerCache.h" diff --git a/Source/Core/VideoBackends/OGL/TextureCache.h b/Source/Core/VideoBackends/OGL/TextureCache.h index 3f6f54b876..d24fc816f4 100644 --- a/Source/Core/VideoBackends/OGL/TextureCache.h +++ b/Source/Core/VideoBackends/OGL/TextureCache.h @@ -6,7 +6,8 @@ #include -#include "VideoBackends/OGL/GLUtil.h" +#include "Common/GL/GLUtil.h" + #include "VideoCommon/BPStructs.h" #include "VideoCommon/TextureCacheBase.h" #include "VideoCommon/VideoCommon.h" diff --git a/Source/Core/VideoBackends/OGL/TextureConverter.h b/Source/Core/VideoBackends/OGL/TextureConverter.h index 186c9fe6d0..daec781a87 100644 --- a/Source/Core/VideoBackends/OGL/TextureConverter.h +++ b/Source/Core/VideoBackends/OGL/TextureConverter.h @@ -4,7 +4,8 @@ #pragma once -#include "VideoBackends/OGL/GLUtil.h" +#include "Common/GL/GLUtil.h" + #include "VideoCommon/TextureCacheBase.h" #include "VideoCommon/VideoCommon.h" diff --git a/Source/Core/VideoBackends/OGL/VertexManager.h b/Source/Core/VideoBackends/OGL/VertexManager.h index 9bcef24589..0d6a1c00c6 100644 --- a/Source/Core/VideoBackends/OGL/VertexManager.h +++ b/Source/Core/VideoBackends/OGL/VertexManager.h @@ -4,7 +4,8 @@ #pragma once -#include "VideoBackends/OGL/GLExtensions/GLExtensions.h" +#include "Common/GL/GLExtensions/GLExtensions.h" + #include "VideoCommon/CPMemory.h" #include "VideoCommon/NativeVertexFormat.h" #include "VideoCommon/VertexManagerBase.h" diff --git a/Source/Core/VideoBackends/OGL/main.cpp b/Source/Core/VideoBackends/OGL/main.cpp index 1b4ae331b6..29fb24cfa9 100644 --- a/Source/Core/VideoBackends/OGL/main.cpp +++ b/Source/Core/VideoBackends/OGL/main.cpp @@ -44,6 +44,8 @@ Make AA apply instantly during gameplay if possible #include "Common/CommonPaths.h" #include "Common/FileSearch.h" #include "Common/Thread.h" +#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLUtil.h" #include "Common/Logging/LogManager.h" #include "Core/ConfigManager.h" @@ -52,8 +54,6 @@ Make AA apply instantly during gameplay if possible #include "VideoBackends/OGL/BoundingBox.h" #include "VideoBackends/OGL/FramebufferManager.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" -#include "VideoBackends/OGL/GLUtil.h" #include "VideoBackends/OGL/PerfQuery.h" #include "VideoBackends/OGL/PostProcessing.h" #include "VideoBackends/OGL/ProgramShaderCache.h" diff --git a/Source/Core/VideoBackends/Software/EfbCopy.cpp b/Source/Core/VideoBackends/Software/EfbCopy.cpp index 42759e20e9..39dff99ad0 100644 --- a/Source/Core/VideoBackends/Software/EfbCopy.cpp +++ b/Source/Core/VideoBackends/Software/EfbCopy.cpp @@ -2,9 +2,9 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "Common/GL/GLInterfaceBase.h" #include "Core/Core.h" #include "Core/HW/Memmap.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" #include "VideoBackends/Software/BPMemLoader.h" #include "VideoBackends/Software/DebugUtil.h" #include "VideoBackends/Software/EfbCopy.h" diff --git a/Source/Core/VideoBackends/Software/RasterFont.cpp b/Source/Core/VideoBackends/Software/RasterFont.cpp index 70b1f3e05a..ebbfe33a62 100644 --- a/Source/Core/VideoBackends/Software/RasterFont.cpp +++ b/Source/Core/VideoBackends/Software/RasterFont.cpp @@ -4,7 +4,7 @@ #include -#include "VideoBackends/OGL/GLUtil.h" +#include "Common/GL/GLUtil.h" #include "VideoBackends/Software/RasterFont.h" const GLubyte rasters[][13] = { diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp index df005fee40..376cf89b11 100644 --- a/Source/Core/VideoBackends/Software/SWRenderer.cpp +++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp @@ -9,13 +9,16 @@ #include "Common/CommonTypes.h" #include "Common/StringUtil.h" +#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLUtil.h" + #include "Core/Core.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" -#include "VideoBackends/OGL/GLUtil.h" + #include "VideoBackends/Software/RasterFont.h" #include "VideoBackends/Software/SWCommandProcessor.h" #include "VideoBackends/Software/SWRenderer.h" #include "VideoBackends/Software/SWStatistics.h" + #include "VideoCommon/ImageWrite.h" #include "VideoCommon/OnScreenDisplay.h" diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp index 12713bcc4e..83b55d0370 100644 --- a/Source/Core/VideoBackends/Software/SWmain.cpp +++ b/Source/Core/VideoBackends/Software/SWmain.cpp @@ -8,6 +8,9 @@ #include "Common/CommonTypes.h" #include "Common/FileUtil.h" #include "Common/StringUtil.h" +#include "Common/GL/GLInterfaceBase.h" +#include "Common/GL/GLUtil.h" +#include "Common/GL/GLExtensions/GLExtensions.h" #include "Common/Logging/LogManager.h" #include "Core/ConfigManager.h" @@ -16,9 +19,6 @@ #include "Core/HW/Memmap.h" #include "Core/HW/VideoInterface.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" -#include "VideoBackends/OGL/GLUtil.h" -#include "VideoBackends/OGL/GLExtensions/GLExtensions.h" #include "VideoBackends/Software/BPMemLoader.h" #include "VideoBackends/Software/Clipper.h" #include "VideoBackends/Software/DebugUtil.h" diff --git a/Source/UnitTests/TestUtils/StubHost.cpp b/Source/UnitTests/TestUtils/StubHost.cpp index 1f8e717402..2cf0d60396 100644 --- a/Source/UnitTests/TestUtils/StubHost.cpp +++ b/Source/UnitTests/TestUtils/StubHost.cpp @@ -7,8 +7,8 @@ #include +#include "Common/GL/GLInterfaceBase.h" #include "Core/Host.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" void Host_NotifyMapLoaded() {} void Host_RefreshDSPDebuggerWindow() {}