From 0cb2a1b8e959298151512278be1b5f3997e2c13c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 10 Apr 2020 22:10:49 +0200 Subject: [PATCH] - moved gl_load to common. --- src/CMakeLists.txt | 11 +++++++---- src/{ => common}/rendering/gl_load/gl_extlist.txt | 0 src/{ => common}/rendering/gl_load/gl_interface.cpp | 4 ++-- src/{ => common}/rendering/gl_load/gl_interface.h | 0 src/{ => common}/rendering/gl_load/gl_load.c | 0 src/{ => common}/rendering/gl_load/gl_load.h | 0 src/{ => common}/rendering/gl_load/gl_system.h | 0 src/d_anonstats.cpp | 2 +- src/posix/cocoa/i_video.mm | 2 +- src/posix/sdl/sdlglvideo.cpp | 2 +- src/rendering/gl/renderer/gl_postprocess.cpp | 2 +- src/rendering/gl/renderer/gl_postprocessstate.cpp | 4 ++-- src/rendering/gl/renderer/gl_postprocessstate.h | 2 +- src/rendering/gl/renderer/gl_renderbuffers.cpp | 4 ++-- src/rendering/gl/renderer/gl_renderer.cpp | 4 ++-- src/rendering/gl/renderer/gl_renderstate.cpp | 4 ++-- src/rendering/gl/renderer/gl_renderstate.h | 2 +- src/rendering/gl/renderer/gl_scene.cpp | 4 ++-- src/rendering/gl/renderer/gl_stereo3d.cpp | 2 +- src/rendering/gl/shaders/gl_shader.cpp | 4 ++-- src/rendering/gl/shaders/gl_shaderprogram.cpp | 4 ++-- src/rendering/gl/shaders/gl_shaderprogram.h | 2 +- src/rendering/gl/system/gl_buffers.cpp | 2 +- src/rendering/gl/system/gl_debug.cpp | 2 +- src/rendering/gl/system/gl_debug.h | 2 +- src/rendering/gl/system/gl_framebuffer.cpp | 4 ++-- src/rendering/gl/textures/gl_hwtexture.cpp | 4 ++-- src/rendering/gl/textures/gl_hwtexture.h | 2 +- src/rendering/gl/textures/gl_samplers.cpp | 4 ++-- 29 files changed, 41 insertions(+), 38 deletions(-) rename src/{ => common}/rendering/gl_load/gl_extlist.txt (100%) rename src/{ => common}/rendering/gl_load/gl_interface.cpp (99%) rename src/{ => common}/rendering/gl_load/gl_interface.h (100%) rename src/{ => common}/rendering/gl_load/gl_load.c (100%) rename src/{ => common}/rendering/gl_load/gl_load.h (100%) rename src/{ => common}/rendering/gl_load/gl_system.h (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5d4fe9d41..adc168fc2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -614,6 +614,7 @@ file( GLOB HEADER_FILES common/thirdparty/*.h common/thirdparty/rapidjson/*.h common/thirdparty/math/*h + common/rendering/gl_load/*.h common/scripting/core/*h common/scripting/vm/*h common/scripting/jit/*h @@ -660,7 +661,6 @@ file( GLOB HEADER_FILES rendering/gl/shaders/*.h rendering/gl/system/*.h rendering/gl/textures/*.h - rendering/gl_load/*.h *.h ) @@ -764,7 +764,7 @@ set( FASTMATH_SOURCES common/textures/hires/hqnx/hq4x.cpp common/textures/hires/xbr/xbrz.cpp common/textures/hires/xbr/xbrz_old.cpp - rendering/gl_load/gl_load.c + common/rendering/gl_load/gl_load.c rendering/hwrenderer/postprocessing/hw_postprocess_cvars.cpp rendering/hwrenderer/postprocessing/hw_postprocessshader.cpp rendering/hwrenderer/dynlights/hw_dynlightdata.cpp @@ -949,7 +949,6 @@ set (PCH_SOURCES rendering/gl/renderer/gl_scene.cpp rendering/gl/shaders/gl_shader.cpp rendering/gl/shaders/gl_shaderprogram.cpp - rendering/gl_load/gl_interface.cpp rendering/gl/system/gl_framebuffer.cpp rendering/gl/system/gl_debug.cpp rendering/gl/system/gl_buffers.cpp @@ -1144,6 +1143,7 @@ set (PCH_SOURCES common/objects/dobject.cpp common/objects/dobjgc.cpp common/objects/dobjtype.cpp + common/rendering/gl_load/gl_interface.cpp common/scripting/core/dictionary.cpp common/scripting/core/dynarrays.cpp common/scripting/core/symbols.cpp @@ -1249,6 +1249,8 @@ include_directories( . common/engine common/fonts common/objects + common/rendering + common/rendering/gl_load common/scripting/vm common/scripting/jit common/scripting/core @@ -1407,7 +1409,6 @@ source_group("Rendering\\Vulkan Renderer\\Textures" REGULAR_EXPRESSION "^${CMAKE source_group("Rendering\\Vulkan Renderer\\Third Party" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/vulkan/thirdparty/.+") source_group("Rendering\\Vulkan Renderer\\Third Party\\Volk" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/vulkan/thirdparty/volk/.+") source_group("Rendering\\Vulkan Renderer\\Third Party\\Vk_Mem_Alloc" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/vulkan/thirdparty/vk_mem_alloc.+") -source_group("Rendering\\OpenGL Loader" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/gl_load/.+") source_group("Rendering\\OpenGL Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/gl/.+") source_group("Rendering\\OpenGL Renderer\\Data" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/gl/data/.+") source_group("Rendering\\OpenGL Renderer\\Dynamic Lights" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/gl/dynlights/.+") @@ -1461,6 +1462,8 @@ source_group("Common\\Scripting\\Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_S source_group("Common\\Scripting\\Core" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/core/.+") source_group("Common\\Scripting\\JIT" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/jit/.+") source_group("Common\\Scripting\\VM" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/vm/.+") +source_group("Common\\Rendering" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/.+") +source_group("Common\\Rendering\\OpenGL Loader" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/gl_load/.+") source_group("Common\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/.+") source_group("Common\\Textures\\Hires" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/hires/.+") source_group("Common\\Textures\\Hires\\HQ Resize" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/hires/hqnx/.+") diff --git a/src/rendering/gl_load/gl_extlist.txt b/src/common/rendering/gl_load/gl_extlist.txt similarity index 100% rename from src/rendering/gl_load/gl_extlist.txt rename to src/common/rendering/gl_load/gl_extlist.txt diff --git a/src/rendering/gl_load/gl_interface.cpp b/src/common/rendering/gl_load/gl_interface.cpp similarity index 99% rename from src/rendering/gl_load/gl_interface.cpp rename to src/common/rendering/gl_load/gl_interface.cpp index 10e727d8e..3b5309e8c 100644 --- a/src/rendering/gl_load/gl_interface.cpp +++ b/src/common/rendering/gl_load/gl_interface.cpp @@ -32,7 +32,7 @@ ** */ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "engineerrors.h" #include "tarray.h" #include "basics.h" @@ -40,7 +40,7 @@ #include "version.h" #include "v_video.h" #include "printf.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" static TArray m_Extensions; RenderContext gl; diff --git a/src/rendering/gl_load/gl_interface.h b/src/common/rendering/gl_load/gl_interface.h similarity index 100% rename from src/rendering/gl_load/gl_interface.h rename to src/common/rendering/gl_load/gl_interface.h diff --git a/src/rendering/gl_load/gl_load.c b/src/common/rendering/gl_load/gl_load.c similarity index 100% rename from src/rendering/gl_load/gl_load.c rename to src/common/rendering/gl_load/gl_load.c diff --git a/src/rendering/gl_load/gl_load.h b/src/common/rendering/gl_load/gl_load.h similarity index 100% rename from src/rendering/gl_load/gl_load.h rename to src/common/rendering/gl_load/gl_load.h diff --git a/src/rendering/gl_load/gl_system.h b/src/common/rendering/gl_load/gl_system.h similarity index 100% rename from src/rendering/gl_load/gl_system.h rename to src/common/rendering/gl_load/gl_system.h diff --git a/src/d_anonstats.cpp b/src/d_anonstats.cpp index 92846b0c1..bd2ba6e68 100644 --- a/src/d_anonstats.cpp +++ b/src/d_anonstats.cpp @@ -34,7 +34,7 @@ extern int sys_ostype; #include "x86.h" #include "version.h" #include "v_video.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" CVAR(Int, sys_statsenabled, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOSET) CVAR(String, sys_statshost, "gzstats.drdteam.org", CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOSET) diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index b220609e8..704dbaf91 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -31,7 +31,7 @@ ** */ -#include "gl_load/gl_load.h" +#include "gl_load.h" #ifdef HAVE_VULKAN #define VK_USE_PLATFORM_MACOS_MVK diff --git a/src/posix/sdl/sdlglvideo.cpp b/src/posix/sdl/sdlglvideo.cpp index 9d5e26798..ff7cc53c0 100644 --- a/src/posix/sdl/sdlglvideo.cpp +++ b/src/posix/sdl/sdlglvideo.cpp @@ -47,7 +47,7 @@ #include "hardware.h" #include "gl_sysfb.h" -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "r_defs.h" #include "gl/renderer/gl_renderer.h" diff --git a/src/rendering/gl/renderer/gl_postprocess.cpp b/src/rendering/gl/renderer/gl_postprocess.cpp index f86189268..8d1cee2c6 100644 --- a/src/rendering/gl/renderer/gl_postprocess.cpp +++ b/src/rendering/gl/renderer/gl_postprocess.cpp @@ -19,7 +19,7 @@ ** 3. This notice may not be removed or altered from any source distribution. */ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "gi.h" #include "m_png.h" #include "r_utility.h" diff --git a/src/rendering/gl/renderer/gl_postprocessstate.cpp b/src/rendering/gl/renderer/gl_postprocessstate.cpp index e147e6adb..095aa24fe 100644 --- a/src/rendering/gl/renderer/gl_postprocessstate.cpp +++ b/src/rendering/gl/renderer/gl_postprocessstate.cpp @@ -20,8 +20,8 @@ */ #include "templates.h" -#include "gl_load/gl_system.h" -#include "gl_load/gl_interface.h" +#include "gl_system.h" +#include "gl_interface.h" #include "gl/renderer/gl_postprocessstate.h" namespace OpenGLRenderer diff --git a/src/rendering/gl/renderer/gl_postprocessstate.h b/src/rendering/gl/renderer/gl_postprocessstate.h index 57bef88fd..c5a89445b 100644 --- a/src/rendering/gl/renderer/gl_postprocessstate.h +++ b/src/rendering/gl/renderer/gl_postprocessstate.h @@ -2,7 +2,7 @@ #define __GL_POSTPROCESSSTATE_H #include -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "matrix.h" #include "c_cvars.h" #include "r_defs.h" diff --git a/src/rendering/gl/renderer/gl_renderbuffers.cpp b/src/rendering/gl/renderer/gl_renderbuffers.cpp index 4f2077b24..6953fd9ee 100644 --- a/src/rendering/gl/renderer/gl_renderbuffers.cpp +++ b/src/rendering/gl/renderer/gl_renderbuffers.cpp @@ -19,9 +19,9 @@ ** 3. This notice may not be removed or altered from any source distribution. */ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "v_video.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "hwrenderer/utility/hw_cvars.h" #include "gl/system/gl_debug.h" #include "gl/renderer/gl_renderer.h" diff --git a/src/rendering/gl/renderer/gl_renderer.cpp b/src/rendering/gl/renderer/gl_renderer.cpp index d8690fd80..06fc5d27b 100644 --- a/src/rendering/gl/renderer/gl_renderer.cpp +++ b/src/rendering/gl/renderer/gl_renderer.cpp @@ -25,7 +25,7 @@ ** */ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "files.h" #include "v_video.h" #include "m_png.h" @@ -40,7 +40,7 @@ #include "swrenderer/r_swscene.h" #include "hwrenderer/utility/hw_clock.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "gl/system/gl_framebuffer.h" #include "hwrenderer/utility/hw_cvars.h" #include "gl/system/gl_debug.h" diff --git a/src/rendering/gl/renderer/gl_renderstate.cpp b/src/rendering/gl/renderer/gl_renderstate.cpp index 5e58e7837..fdaebfcd3 100644 --- a/src/rendering/gl/renderer/gl_renderstate.cpp +++ b/src/rendering/gl/renderer/gl_renderstate.cpp @@ -28,8 +28,8 @@ #include "templates.h" #include "doomstat.h" #include "r_data/colormaps.h" -#include "gl_load/gl_system.h" -#include "gl_load/gl_interface.h" +#include "gl_system.h" +#include "gl_interface.h" #include "hwrenderer/utility/hw_cvars.h" #include "hwrenderer/data/flatvertices.h" #include "hwrenderer/scene/hw_skydome.h" diff --git a/src/rendering/gl/renderer/gl_renderstate.h b/src/rendering/gl/renderer/gl_renderstate.h index 3229e4ba2..9a52a1d14 100644 --- a/src/rendering/gl/renderer/gl_renderstate.h +++ b/src/rendering/gl/renderer/gl_renderstate.h @@ -24,7 +24,7 @@ #define __GL_RENDERSTATE_H #include -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "matrix.h" #include "hwrenderer/scene//hw_drawstructs.h" #include "hwrenderer/scene//hw_renderstate.h" diff --git a/src/rendering/gl/renderer/gl_scene.cpp b/src/rendering/gl/renderer/gl_scene.cpp index af6c6e581..a1c7a9f7a 100644 --- a/src/rendering/gl/renderer/gl_scene.cpp +++ b/src/rendering/gl/renderer/gl_scene.cpp @@ -25,7 +25,7 @@ ** */ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "gi.h" #include "m_png.h" #include "doomstat.h" @@ -46,7 +46,7 @@ #include "hwrenderer/data/flatvertices.h" #include "hwrenderer/dynlights/hw_lightbuffer.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "gl/system/gl_framebuffer.h" #include "gl/system/gl_debug.h" #include "hwrenderer/utility/hw_cvars.h" diff --git a/src/rendering/gl/renderer/gl_stereo3d.cpp b/src/rendering/gl/renderer/gl_stereo3d.cpp index fe5b29b22..00f830b8f 100644 --- a/src/rendering/gl/renderer/gl_stereo3d.cpp +++ b/src/rendering/gl/renderer/gl_stereo3d.cpp @@ -25,7 +25,7 @@ ** */ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderbuffers.h" #include "hwrenderer/utility/hw_vrmodes.h" diff --git a/src/rendering/gl/shaders/gl_shader.cpp b/src/rendering/gl/shaders/gl_shader.cpp index e6b141e86..1aa23bcbd 100644 --- a/src/rendering/gl/shaders/gl_shader.cpp +++ b/src/rendering/gl/shaders/gl_shader.cpp @@ -26,7 +26,7 @@ ** */ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "c_cvars.h" #include "v_video.h" #include "filesystem.h" @@ -39,7 +39,7 @@ #include "hwrenderer/scene/hw_viewpointuniforms.h" #include "hwrenderer/dynlights/hw_lightbuffer.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "gl/system/gl_debug.h" #include "matrix.h" #include "gl/renderer/gl_renderer.h" diff --git a/src/rendering/gl/shaders/gl_shaderprogram.cpp b/src/rendering/gl/shaders/gl_shaderprogram.cpp index 97fd8caec..f958bd35d 100644 --- a/src/rendering/gl/shaders/gl_shaderprogram.cpp +++ b/src/rendering/gl/shaders/gl_shaderprogram.cpp @@ -25,9 +25,9 @@ ** */ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "v_video.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "hwrenderer/utility/hw_cvars.h" #include "gl/system/gl_debug.h" #include "gl/shaders/gl_shaderprogram.h" diff --git a/src/rendering/gl/shaders/gl_shaderprogram.h b/src/rendering/gl/shaders/gl_shaderprogram.h index e073d62e0..90e257297 100644 --- a/src/rendering/gl/shaders/gl_shaderprogram.h +++ b/src/rendering/gl/shaders/gl_shaderprogram.h @@ -1,7 +1,7 @@ #pragma once -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "gl_shader.h" #include "hwrenderer/postprocessing/hw_postprocess.h" diff --git a/src/rendering/gl/system/gl_buffers.cpp b/src/rendering/gl/system/gl_buffers.cpp index f7cd34a3e..702aae2db 100644 --- a/src/rendering/gl/system/gl_buffers.cpp +++ b/src/rendering/gl/system/gl_buffers.cpp @@ -24,7 +24,7 @@ ** **/ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "gl_buffers.h" #include "gl/renderer/gl_renderstate.h" #include "v_video.h" diff --git a/src/rendering/gl/system/gl_debug.cpp b/src/rendering/gl/system/gl_debug.cpp index 2cf781a28..5c65814f7 100644 --- a/src/rendering/gl/system/gl_debug.cpp +++ b/src/rendering/gl/system/gl_debug.cpp @@ -26,7 +26,7 @@ */ #include "templates.h" -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "gl/system/gl_debug.h" #include "stats.h" #include diff --git a/src/rendering/gl/system/gl_debug.h b/src/rendering/gl/system/gl_debug.h index a234a0879..03c10c67e 100644 --- a/src/rendering/gl/system/gl_debug.h +++ b/src/rendering/gl/system/gl_debug.h @@ -2,7 +2,7 @@ #define __GL_DEBUG_H #include -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "c_cvars.h" #include "r_defs.h" #include "v_video.h" diff --git a/src/rendering/gl/system/gl_framebuffer.cpp b/src/rendering/gl/system/gl_framebuffer.cpp index 48dccc0a3..f025a4e86 100644 --- a/src/rendering/gl/system/gl_framebuffer.cpp +++ b/src/rendering/gl/system/gl_framebuffer.cpp @@ -26,12 +26,12 @@ ** */ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "v_video.h" #include "m_png.h" #include "templates.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "gl/system/gl_framebuffer.h" #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderbuffers.h" diff --git a/src/rendering/gl/textures/gl_hwtexture.cpp b/src/rendering/gl/textures/gl_hwtexture.cpp index 26069b1b1..c849aea39 100644 --- a/src/rendering/gl/textures/gl_hwtexture.cpp +++ b/src/rendering/gl/textures/gl_hwtexture.cpp @@ -26,14 +26,14 @@ ** */ -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "templates.h" #include "c_cvars.h" #include "doomtype.h" #include "r_data/colormaps.h" #include "hw_material.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "hwrenderer/utility/hw_cvars.h" #include "gl/system/gl_debug.h" #include "gl/renderer/gl_renderer.h" diff --git a/src/rendering/gl/textures/gl_hwtexture.h b/src/rendering/gl/textures/gl_hwtexture.h index c32dd25f7..727774672 100644 --- a/src/rendering/gl/textures/gl_hwtexture.h +++ b/src/rendering/gl/textures/gl_hwtexture.h @@ -10,7 +10,7 @@ #define DIRECT_PALETTE -2 #include "tarray.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "hw_ihwtexture.h" class FCanvasTexture; diff --git a/src/rendering/gl/textures/gl_samplers.cpp b/src/rendering/gl/textures/gl_samplers.cpp index fa2082d21..f4cdd60e7 100644 --- a/src/rendering/gl/textures/gl_samplers.cpp +++ b/src/rendering/gl/textures/gl_samplers.cpp @@ -20,10 +20,10 @@ //-------------------------------------------------------------------------- // -#include "gl_load/gl_system.h" +#include "gl_system.h" #include "c_cvars.h" -#include "gl_load/gl_interface.h" +#include "gl_interface.h" #include "hwrenderer/utility/hw_cvars.h" #include "gl/system/gl_debug.h" #include "gl/renderer/gl_renderer.h"