From b60fd4d8bca73e0f77714f61f673c0df0c161aa0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 29 May 2020 11:53:37 +0200 Subject: [PATCH] - removed redundant TextureFilterChanged method from DFrameBuffer. --- src/common/rendering/gl/gl_framebuffer.cpp | 5 ----- src/common/rendering/gl/gl_framebuffer.h | 1 - src/common/rendering/hwrenderer/data/hw_cvars.cpp | 4 ++-- .../rendering/polyrenderer/backend/poly_framebuffer.cpp | 5 ----- src/common/rendering/polyrenderer/backend/poly_framebuffer.h | 1 - src/common/rendering/v_video.h | 1 - src/common/rendering/vulkan/system/vk_framebuffer.cpp | 5 ----- src/common/rendering/vulkan/system/vk_framebuffer.h | 1 - 8 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/common/rendering/gl/gl_framebuffer.cpp b/src/common/rendering/gl/gl_framebuffer.cpp index 6c5dbb3db..d91503c3c 100644 --- a/src/common/rendering/gl/gl_framebuffer.cpp +++ b/src/common/rendering/gl/gl_framebuffer.cpp @@ -340,11 +340,6 @@ IDataBuffer *OpenGLFrameBuffer::CreateDataBuffer(int bindingpoint, bool ssbo, bo return new GLDataBuffer(bindingpoint, ssbo); } -void OpenGLFrameBuffer::TextureFilterChanged() -{ - if (GLRenderer != NULL && GLRenderer->mSamplerManager != NULL) GLRenderer->mSamplerManager->SetTextureFilterMode(); -} - void OpenGLFrameBuffer::BlurScene(float amount) { GLRenderer->BlurScene(amount); diff --git a/src/common/rendering/gl/gl_framebuffer.h b/src/common/rendering/gl/gl_framebuffer.h index a99aef08c..aaebbfeb3 100644 --- a/src/common/rendering/gl/gl_framebuffer.h +++ b/src/common/rendering/gl/gl_framebuffer.h @@ -43,7 +43,6 @@ public: void SetTextureFilterMode() override; IHardwareTexture *CreateHardwareTexture(int numchannels) override; void PrecacheMaterial(FMaterial *mat, int translation) override; - void TextureFilterChanged() override; void BeginFrame() override; void SetViewportRects(IntRect *bounds) override; void BlurScene(float amount) override; diff --git a/src/common/rendering/hwrenderer/data/hw_cvars.cpp b/src/common/rendering/hwrenderer/data/hw_cvars.cpp index 74edce16b..c8a7abc28 100644 --- a/src/common/rendering/hwrenderer/data/hw_cvars.cpp +++ b/src/common/rendering/hwrenderer/data/hw_cvars.cpp @@ -121,13 +121,13 @@ CVAR(Int, gl_satformula, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG); //========================================================================== CUSTOM_CVARD(Float, gl_texture_filter_anisotropic, 8, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL, "changes the OpenGL texture anisotropy setting") { - screen->TextureFilterChanged(); + screen->SetTextureFilterMode(); } CUSTOM_CVARD(Int, gl_texture_filter, 4, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL, "changes the texture filtering settings") { if (self < 0 || self > 6) self=4; - screen->TextureFilterChanged(); + screen->SetTextureFilterMode(); } CVAR(Bool, gl_precache, false, CVAR_ARCHIVE) diff --git a/src/common/rendering/polyrenderer/backend/poly_framebuffer.cpp b/src/common/rendering/polyrenderer/backend/poly_framebuffer.cpp index d9cb212e3..d1dbd63db 100644 --- a/src/common/rendering/polyrenderer/backend/poly_framebuffer.cpp +++ b/src/common/rendering/polyrenderer/backend/poly_framebuffer.cpp @@ -329,11 +329,6 @@ IDataBuffer *PolyFrameBuffer::CreateDataBuffer(int bindingpoint, bool ssbo, bool } void PolyFrameBuffer::SetTextureFilterMode() -{ - TextureFilterChanged(); -} - -void PolyFrameBuffer::TextureFilterChanged() { } diff --git a/src/common/rendering/polyrenderer/backend/poly_framebuffer.h b/src/common/rendering/polyrenderer/backend/poly_framebuffer.h index 68e722a2b..84982d9d5 100644 --- a/src/common/rendering/polyrenderer/backend/poly_framebuffer.h +++ b/src/common/rendering/polyrenderer/backend/poly_framebuffer.h @@ -37,7 +37,6 @@ public: void PrecacheMaterial(FMaterial *mat, int translation) override; void UpdatePalette() override; void SetTextureFilterMode() override; - void TextureFilterChanged() override; void BeginFrame() override; void BlurScene(float amount) override; void PostProcessScene(bool swscene, int fixedcm, const std::function &afterBloomDrawEndScene2D) override; diff --git a/src/common/rendering/v_video.h b/src/common/rendering/v_video.h index 1cb32573e..ac61291dd 100644 --- a/src/common/rendering/v_video.h +++ b/src/common/rendering/v_video.h @@ -200,7 +200,6 @@ public: virtual IHardwareTexture *CreateHardwareTexture(int numchannels) { return nullptr; } virtual void PrecacheMaterial(FMaterial *mat, int translation) {} virtual FMaterial* CreateMaterial(FGameTexture* tex, int scaleflags); - virtual void TextureFilterChanged() {} virtual void BeginFrame() {} virtual void SetWindowSize(int w, int h) {} virtual void StartPrecaching() {} diff --git a/src/common/rendering/vulkan/system/vk_framebuffer.cpp b/src/common/rendering/vulkan/system/vk_framebuffer.cpp index 76e9c219f..602d628b1 100644 --- a/src/common/rendering/vulkan/system/vk_framebuffer.cpp +++ b/src/common/rendering/vulkan/system/vk_framebuffer.cpp @@ -419,11 +419,6 @@ IDataBuffer *VulkanFrameBuffer::CreateDataBuffer(int bindingpoint, bool ssbo, bo } void VulkanFrameBuffer::SetTextureFilterMode() -{ - TextureFilterChanged(); -} - -void VulkanFrameBuffer::TextureFilterChanged() { if (mSamplerManager) { diff --git a/src/common/rendering/vulkan/system/vk_framebuffer.h b/src/common/rendering/vulkan/system/vk_framebuffer.h index b325466fe..b1a776452 100644 --- a/src/common/rendering/vulkan/system/vk_framebuffer.h +++ b/src/common/rendering/vulkan/system/vk_framebuffer.h @@ -77,7 +77,6 @@ public: const char* DeviceName() const override; int Backend() override { return 1; } void SetTextureFilterMode() override; - void TextureFilterChanged() override; void StartPrecaching() override; void BeginFrame() override; void BlurScene(float amount) override;