From 9a7f9bdb4c9c5983394d7b8cd1d95e90aeb8a8eb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 13 Jun 2018 22:37:01 +0200 Subject: [PATCH] - moved postprocessing shader classes to hwrenderer after removing all dependencies on OpenGL. --- src/CMakeLists.txt | 20 +++++++++---------- src/gl/renderer/gl_postprocess.cpp | 16 +++++++-------- src/gl/renderer/gl_renderer.cpp | 20 +++++++++---------- .../postprocessing/hw_ambientshader.cpp} | 2 +- .../postprocessing/hw_ambientshader.h} | 0 .../postprocessing/hw_bloomshader.cpp} | 2 +- .../postprocessing/hw_bloomshader.h} | 0 .../postprocessing/hw_blurshader.cpp} | 2 +- .../postprocessing/hw_blurshader.h} | 0 .../postprocessing/hw_colormapshader.cpp} | 2 +- .../postprocessing/hw_colormapshader.h} | 0 .../postprocessing/hw_fxaashader.cpp} | 2 +- .../postprocessing/hw_fxaashader.h} | 0 .../postprocessing/hw_lensshader.cpp} | 2 +- .../postprocessing/hw_lensshader.h} | 0 .../postprocessing/hw_present3dRowshader.cpp} | 3 +-- .../postprocessing/hw_present3dRowshader.h} | 4 ++-- .../postprocessing/hw_presentshader.cpp} | 2 +- .../postprocessing/hw_presentshader.h} | 0 .../postprocessing/hw_shadowmapshader.cpp} | 2 +- .../postprocessing/hw_shadowmapshader.h} | 0 .../postprocessing/hw_tonemapshader.cpp} | 2 +- .../postprocessing/hw_tonemapshader.h} | 0 23 files changed, 40 insertions(+), 41 deletions(-) rename src/{gl/shaders/gl_ambientshader.cpp => hwrenderer/postprocessing/hw_ambientshader.cpp} (99%) rename src/{gl/shaders/gl_ambientshader.h => hwrenderer/postprocessing/hw_ambientshader.h} (100%) rename src/{gl/shaders/gl_bloomshader.cpp => hwrenderer/postprocessing/hw_bloomshader.cpp} (97%) rename src/{gl/shaders/gl_bloomshader.h => hwrenderer/postprocessing/hw_bloomshader.h} (100%) rename src/{gl/shaders/gl_blurshader.cpp => hwrenderer/postprocessing/hw_blurshader.cpp} (97%) rename src/{gl/shaders/gl_blurshader.h => hwrenderer/postprocessing/hw_blurshader.h} (100%) rename src/{gl/shaders/gl_colormapshader.cpp => hwrenderer/postprocessing/hw_colormapshader.cpp} (97%) rename src/{gl/shaders/gl_colormapshader.h => hwrenderer/postprocessing/hw_colormapshader.h} (100%) rename src/{gl/shaders/gl_fxaashader.cpp => hwrenderer/postprocessing/hw_fxaashader.cpp} (98%) rename src/{gl/shaders/gl_fxaashader.h => hwrenderer/postprocessing/hw_fxaashader.h} (100%) rename src/{gl/shaders/gl_lensshader.cpp => hwrenderer/postprocessing/hw_lensshader.cpp} (97%) rename src/{gl/shaders/gl_lensshader.h => hwrenderer/postprocessing/hw_lensshader.h} (100%) rename src/{gl/shaders/gl_present3dRowshader.cpp => hwrenderer/postprocessing/hw_present3dRowshader.cpp} (95%) rename src/{gl/shaders/gl_present3dRowshader.h => hwrenderer/postprocessing/hw_present3dRowshader.h} (96%) rename src/{gl/shaders/gl_presentshader.cpp => hwrenderer/postprocessing/hw_presentshader.cpp} (97%) rename src/{gl/shaders/gl_presentshader.h => hwrenderer/postprocessing/hw_presentshader.h} (100%) rename src/{gl/shaders/gl_shadowmapshader.cpp => hwrenderer/postprocessing/hw_shadowmapshader.cpp} (97%) rename src/{gl/shaders/gl_shadowmapshader.h => hwrenderer/postprocessing/hw_shadowmapshader.h} (100%) rename src/{gl/shaders/gl_tonemapshader.cpp => hwrenderer/postprocessing/hw_tonemapshader.cpp} (98%) rename src/{gl/shaders/gl_tonemapshader.h => hwrenderer/postprocessing/hw_tonemapshader.h} (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4878b3873..6361a9f2e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1027,16 +1027,6 @@ set (PCH_SOURCES gl/shaders/gl_shader.cpp gl/shaders/gl_shaderprogram.cpp gl/shaders/gl_postprocessshader.cpp - gl/shaders/gl_shadowmapshader.cpp - gl/shaders/gl_presentshader.cpp - gl/shaders/gl_present3dRowshader.cpp - gl/shaders/gl_bloomshader.cpp - gl/shaders/gl_ambientshader.cpp - gl/shaders/gl_blurshader.cpp - gl/shaders/gl_colormapshader.cpp - gl/shaders/gl_tonemapshader.cpp - gl/shaders/gl_lensshader.cpp - gl/shaders/gl_fxaashader.cpp gl/stereo3d/gl_stereo3d.cpp gl/stereo3d/gl_stereo_cvars.cpp gl/stereo3d/gl_stereo_leftright.cpp @@ -1056,6 +1046,16 @@ set (PCH_SOURCES hwrenderer/scene/hw_skydome.cpp hwrenderer/postprocessing/hw_postprocess_cvars.cpp hwrenderer/postprocessing/hw_postprocessshader.cpp + hwrenderer/postprocessing/hw_shadowmapshader.cpp + hwrenderer/postprocessing/hw_presentshader.cpp + hwrenderer/postprocessing/hw_present3dRowshader.cpp + hwrenderer/postprocessing/hw_bloomshader.cpp + hwrenderer/postprocessing/hw_ambientshader.cpp + hwrenderer/postprocessing/hw_blurshader.cpp + hwrenderer/postprocessing/hw_colormapshader.cpp + hwrenderer/postprocessing/hw_tonemapshader.cpp + hwrenderer/postprocessing/hw_lensshader.cpp + hwrenderer/postprocessing/hw_fxaashader.cpp hwrenderer/textures/hw_material.cpp hwrenderer/textures/hw_precache.cpp hwrenderer/utility/hw_clock.cpp diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index 981f07b76..637581b71 100644 --- a/src/gl/renderer/gl_postprocess.cpp +++ b/src/gl/renderer/gl_postprocess.cpp @@ -39,14 +39,14 @@ #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_postprocessstate.h" #include "gl/data/gl_vertexbuffer.h" -#include "gl/shaders/gl_ambientshader.h" -#include "gl/shaders/gl_bloomshader.h" -#include "gl/shaders/gl_blurshader.h" -#include "gl/shaders/gl_tonemapshader.h" -#include "gl/shaders/gl_colormapshader.h" -#include "gl/shaders/gl_lensshader.h" -#include "gl/shaders/gl_fxaashader.h" -#include "gl/shaders/gl_presentshader.h" +#include "hwrenderer/postprocessing/hw_ambientshader.h" +#include "hwrenderer/postprocessing/hw_bloomshader.h" +#include "hwrenderer/postprocessing/hw_blurshader.h" +#include "hwrenderer/postprocessing/hw_tonemapshader.h" +#include "hwrenderer/postprocessing/hw_colormapshader.h" +#include "hwrenderer/postprocessing/hw_lensshader.h" +#include "hwrenderer/postprocessing/hw_fxaashader.h" +#include "hwrenderer/postprocessing/hw_presentshader.h" #include "gl/shaders/gl_postprocessshaderinstance.h" #include "gl/stereo3d/gl_stereo3d.h" #include "gl/textures/gl_hwtexture.h" diff --git a/src/gl/renderer/gl_renderer.cpp b/src/gl/renderer/gl_renderer.cpp index c753e261e..cac056bd4 100644 --- a/src/gl/renderer/gl_renderer.cpp +++ b/src/gl/renderer/gl_renderer.cpp @@ -50,16 +50,16 @@ #include "gl/data/gl_vertexbuffer.h" #include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_scenedrawer.h" -#include "gl/shaders/gl_ambientshader.h" -#include "gl/shaders/gl_bloomshader.h" -#include "gl/shaders/gl_blurshader.h" -#include "gl/shaders/gl_tonemapshader.h" -#include "gl/shaders/gl_colormapshader.h" -#include "gl/shaders/gl_lensshader.h" -#include "gl/shaders/gl_fxaashader.h" -#include "gl/shaders/gl_presentshader.h" -#include "gl/shaders/gl_present3dRowshader.h" -#include "gl/shaders/gl_shadowmapshader.h" +#include "hwrenderer/postprocessing/hw_ambientshader.h" +#include "hwrenderer/postprocessing/hw_bloomshader.h" +#include "hwrenderer/postprocessing/hw_blurshader.h" +#include "hwrenderer/postprocessing/hw_tonemapshader.h" +#include "hwrenderer/postprocessing/hw_colormapshader.h" +#include "hwrenderer/postprocessing/hw_lensshader.h" +#include "hwrenderer/postprocessing/hw_fxaashader.h" +#include "hwrenderer/postprocessing/hw_presentshader.h" +#include "hwrenderer/postprocessing/hw_present3dRowshader.h" +#include "hwrenderer/postprocessing/hw_shadowmapshader.h" #include "gl/shaders/gl_postprocessshaderinstance.h" #include "gl/stereo3d/gl_stereo3d.h" #include "gl/textures/gl_samplers.h" diff --git a/src/gl/shaders/gl_ambientshader.cpp b/src/hwrenderer/postprocessing/hw_ambientshader.cpp similarity index 99% rename from src/gl/shaders/gl_ambientshader.cpp rename to src/hwrenderer/postprocessing/hw_ambientshader.cpp index a19e8bf0c..ccbb0f579 100644 --- a/src/gl/shaders/gl_ambientshader.cpp +++ b/src/hwrenderer/postprocessing/hw_ambientshader.cpp @@ -22,7 +22,7 @@ #include "v_video.h" #include "hwrenderer/utility/hw_cvars.h" -#include "gl_ambientshader.h" +#include "hw_ambientshader.h" void FLinearDepthShader::Bind(IRenderQueue *q) { diff --git a/src/gl/shaders/gl_ambientshader.h b/src/hwrenderer/postprocessing/hw_ambientshader.h similarity index 100% rename from src/gl/shaders/gl_ambientshader.h rename to src/hwrenderer/postprocessing/hw_ambientshader.h diff --git a/src/gl/shaders/gl_bloomshader.cpp b/src/hwrenderer/postprocessing/hw_bloomshader.cpp similarity index 97% rename from src/gl/shaders/gl_bloomshader.cpp rename to src/hwrenderer/postprocessing/hw_bloomshader.cpp index 1025e9afe..7709769cb 100644 --- a/src/gl/shaders/gl_bloomshader.cpp +++ b/src/hwrenderer/postprocessing/hw_bloomshader.cpp @@ -26,7 +26,7 @@ */ #include "v_video.h" -#include "gl/shaders/gl_bloomshader.h" +#include "hw_bloomshader.h" void FBloomExtractShader::Bind(IRenderQueue *q) { diff --git a/src/gl/shaders/gl_bloomshader.h b/src/hwrenderer/postprocessing/hw_bloomshader.h similarity index 100% rename from src/gl/shaders/gl_bloomshader.h rename to src/hwrenderer/postprocessing/hw_bloomshader.h diff --git a/src/gl/shaders/gl_blurshader.cpp b/src/hwrenderer/postprocessing/hw_blurshader.cpp similarity index 97% rename from src/gl/shaders/gl_blurshader.cpp rename to src/hwrenderer/postprocessing/hw_blurshader.cpp index df929df9d..a9ebe2121 100644 --- a/src/gl/shaders/gl_blurshader.cpp +++ b/src/hwrenderer/postprocessing/hw_blurshader.cpp @@ -26,7 +26,7 @@ */ #include "v_video.h" -#include "gl/shaders/gl_blurshader.h" +#include "hw_blurshader.h" void FBlurShader::Bind(IRenderQueue *q, bool vertical) { diff --git a/src/gl/shaders/gl_blurshader.h b/src/hwrenderer/postprocessing/hw_blurshader.h similarity index 100% rename from src/gl/shaders/gl_blurshader.h rename to src/hwrenderer/postprocessing/hw_blurshader.h diff --git a/src/gl/shaders/gl_colormapshader.cpp b/src/hwrenderer/postprocessing/hw_colormapshader.cpp similarity index 97% rename from src/gl/shaders/gl_colormapshader.cpp rename to src/hwrenderer/postprocessing/hw_colormapshader.cpp index 989cd1145..21cc5c0ea 100644 --- a/src/gl/shaders/gl_colormapshader.cpp +++ b/src/hwrenderer/postprocessing/hw_colormapshader.cpp @@ -26,7 +26,7 @@ */ #include "v_video.h" -#include "gl/shaders/gl_colormapshader.h" +#include "hw_colormapshader.h" void FColormapShader::Bind(IRenderQueue *q) { diff --git a/src/gl/shaders/gl_colormapshader.h b/src/hwrenderer/postprocessing/hw_colormapshader.h similarity index 100% rename from src/gl/shaders/gl_colormapshader.h rename to src/hwrenderer/postprocessing/hw_colormapshader.h diff --git a/src/gl/shaders/gl_fxaashader.cpp b/src/hwrenderer/postprocessing/hw_fxaashader.cpp similarity index 98% rename from src/gl/shaders/gl_fxaashader.cpp rename to src/hwrenderer/postprocessing/hw_fxaashader.cpp index 8d5abe515..d68d1de19 100644 --- a/src/gl/shaders/gl_fxaashader.cpp +++ b/src/hwrenderer/postprocessing/hw_fxaashader.cpp @@ -24,7 +24,7 @@ // Fast approXimate Anti-Aliasing (FXAA) post-processing // -#include "gl/shaders/gl_fxaashader.h" +#include "hw_fxaashader.h" EXTERN_CVAR(Int, gl_fxaa) diff --git a/src/gl/shaders/gl_fxaashader.h b/src/hwrenderer/postprocessing/hw_fxaashader.h similarity index 100% rename from src/gl/shaders/gl_fxaashader.h rename to src/hwrenderer/postprocessing/hw_fxaashader.h diff --git a/src/gl/shaders/gl_lensshader.cpp b/src/hwrenderer/postprocessing/hw_lensshader.cpp similarity index 97% rename from src/gl/shaders/gl_lensshader.cpp rename to src/hwrenderer/postprocessing/hw_lensshader.cpp index 65e32484c..ef0501bcd 100644 --- a/src/gl/shaders/gl_lensshader.cpp +++ b/src/hwrenderer/postprocessing/hw_lensshader.cpp @@ -26,7 +26,7 @@ */ #include "v_video.h" -#include "gl/shaders/gl_lensshader.h" +#include "hw_lensshader.h" void FLensShader::Bind(IRenderQueue *q) { diff --git a/src/gl/shaders/gl_lensshader.h b/src/hwrenderer/postprocessing/hw_lensshader.h similarity index 100% rename from src/gl/shaders/gl_lensshader.h rename to src/hwrenderer/postprocessing/hw_lensshader.h diff --git a/src/gl/shaders/gl_present3dRowshader.cpp b/src/hwrenderer/postprocessing/hw_present3dRowshader.cpp similarity index 95% rename from src/gl/shaders/gl_present3dRowshader.cpp rename to src/hwrenderer/postprocessing/hw_present3dRowshader.cpp index 2a0241097..30575d85c 100644 --- a/src/gl/shaders/gl_present3dRowshader.cpp +++ b/src/hwrenderer/postprocessing/hw_present3dRowshader.cpp @@ -27,8 +27,7 @@ ** */ -#include "gl_load/gl_system.h" -#include "gl/shaders/gl_present3dRowshader.h" +#include "hw_present3dRowshader.h" void FPresent3DCheckerShader::Bind(IRenderQueue *q) { diff --git a/src/gl/shaders/gl_present3dRowshader.h b/src/hwrenderer/postprocessing/hw_present3dRowshader.h similarity index 96% rename from src/gl/shaders/gl_present3dRowshader.h rename to src/hwrenderer/postprocessing/hw_present3dRowshader.h index 6587238d4..faf5c117b 100644 --- a/src/gl/shaders/gl_present3dRowshader.h +++ b/src/hwrenderer/postprocessing/hw_present3dRowshader.h @@ -28,8 +28,8 @@ #ifndef GL_PRESENT3DROWSHADER_H_ #define GL_PRESENT3DROWSHADER_H_ -#include "gl_shaderprogram.h" -#include "gl_presentshader.h" +#include "hw_shaderprogram.h" +#include "hw_presentshader.h" class FPresent3DCheckerShader : public FPresentShaderBase { diff --git a/src/gl/shaders/gl_presentshader.cpp b/src/hwrenderer/postprocessing/hw_presentshader.cpp similarity index 97% rename from src/gl/shaders/gl_presentshader.cpp rename to src/hwrenderer/postprocessing/hw_presentshader.cpp index 83c30934b..ae231d8c3 100644 --- a/src/gl/shaders/gl_presentshader.cpp +++ b/src/hwrenderer/postprocessing/hw_presentshader.cpp @@ -26,7 +26,7 @@ */ #include "v_video.h" -#include "gl/shaders/gl_presentshader.h" +#include "hw_presentshader.h" void FPresentShaderBase::Init(const char * vtx_shader_name, const char * program_name) { diff --git a/src/gl/shaders/gl_presentshader.h b/src/hwrenderer/postprocessing/hw_presentshader.h similarity index 100% rename from src/gl/shaders/gl_presentshader.h rename to src/hwrenderer/postprocessing/hw_presentshader.h diff --git a/src/gl/shaders/gl_shadowmapshader.cpp b/src/hwrenderer/postprocessing/hw_shadowmapshader.cpp similarity index 97% rename from src/gl/shaders/gl_shadowmapshader.cpp rename to src/hwrenderer/postprocessing/hw_shadowmapshader.cpp index 17f4ea947..3772a5036 100644 --- a/src/gl/shaders/gl_shadowmapshader.cpp +++ b/src/hwrenderer/postprocessing/hw_shadowmapshader.cpp @@ -21,7 +21,7 @@ // #include "files.h" -#include "gl/shaders/gl_shadowmapshader.h" +#include "hw_shadowmapshader.h" void FShadowMapShader::Bind(IRenderQueue *q) { diff --git a/src/gl/shaders/gl_shadowmapshader.h b/src/hwrenderer/postprocessing/hw_shadowmapshader.h similarity index 100% rename from src/gl/shaders/gl_shadowmapshader.h rename to src/hwrenderer/postprocessing/hw_shadowmapshader.h diff --git a/src/gl/shaders/gl_tonemapshader.cpp b/src/hwrenderer/postprocessing/hw_tonemapshader.cpp similarity index 98% rename from src/gl/shaders/gl_tonemapshader.cpp rename to src/hwrenderer/postprocessing/hw_tonemapshader.cpp index c3f47e72b..644080fbd 100644 --- a/src/gl/shaders/gl_tonemapshader.cpp +++ b/src/hwrenderer/postprocessing/hw_tonemapshader.cpp @@ -27,7 +27,7 @@ #include "v_video.h" #include "hwrenderer/utility/hw_cvars.h" -#include "gl/shaders/gl_tonemapshader.h" +#include "hw_tonemapshader.h" void FTonemapShader::Bind(IRenderQueue *q) { diff --git a/src/gl/shaders/gl_tonemapshader.h b/src/hwrenderer/postprocessing/hw_tonemapshader.h similarity index 100% rename from src/gl/shaders/gl_tonemapshader.h rename to src/hwrenderer/postprocessing/hw_tonemapshader.h