From d752e3390993e52f699b11b03a59819dbcbed9db Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 31 May 2020 11:47:19 +0200 Subject: [PATCH] - removed the unused SurfaceShader class. --- source/glbackend/gl_shader.cpp | 21 --------------------- source/glbackend/gl_shader.h | 7 ------- source/glbackend/glbackend.cpp | 11 ----------- source/glbackend/glbackend.h | 3 --- 4 files changed, 42 deletions(-) diff --git a/source/glbackend/gl_shader.cpp b/source/glbackend/gl_shader.cpp index 9023a865e..9cdc56c50 100644 --- a/source/glbackend/gl_shader.cpp +++ b/source/glbackend/gl_shader.cpp @@ -181,24 +181,3 @@ bool PolymostShader::Load(const char * name, const char * vert_prog, const char return true; } -//========================================================================== -// -// -// -//========================================================================== - -bool SurfaceShader::Load(const char* name, const char* vert_prog, const char* frag_prog) -{ - if (!FShader::Load(name, vert_prog, frag_prog)) return false; - - glUseProgram(hShader); - - int SamplerLoc; - SamplerLoc = glGetUniformLocation(hShader, "s_texture"); - glUniform1i(SamplerLoc, 0); - SamplerLoc = glGetUniformLocation(hShader, "s_palette"); - glUniform1i(SamplerLoc, 1); - - glUseProgram(0); - return true; -} diff --git a/source/glbackend/gl_shader.h b/source/glbackend/gl_shader.h index 44f245561..a6eeaf05a 100644 --- a/source/glbackend/gl_shader.h +++ b/source/glbackend/gl_shader.h @@ -63,10 +63,3 @@ public: virtual bool Load(const char * name, const char * vert_prog_lump, const char * fragprog); //, const char * fragprog2, const char *defines); }; -class SurfaceShader : public FShader -{ -public: - SurfaceShader() = default; - virtual bool Load(const char* name, const char* vert_prog_lump, const char* fragprog); //, const char * fragprog2, const char *defines); - -}; diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index 448ff962a..d8539dd25 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -145,8 +145,6 @@ void GLInstance::Deinit() #endif if (polymostShader) delete polymostShader; polymostShader = nullptr; - if (surfaceShader) delete surfaceShader; - surfaceShader = nullptr; activeShader = nullptr; palmanager.DeleteAll(); lastPalswapIndex = -1; @@ -255,15 +253,6 @@ void GLInstance::SetPolymostShader() } } -void GLInstance::SetSurfaceShader() -{ - if (activeShader != surfaceShader) - { - surfaceShader->Bind(); - activeShader = surfaceShader; - } -} - void GLInstance::SetPalette(int index) { palmanager.BindPalette(index); diff --git a/source/glbackend/glbackend.h b/source/glbackend/glbackend.h index a21f27458..cbe866fde 100644 --- a/source/glbackend/glbackend.h +++ b/source/glbackend/glbackend.h @@ -14,7 +14,6 @@ class FShader; class PolymostShader; -class SurfaceShader; class FGameTexture; class GLInstance; class F2DDrawer; @@ -122,7 +121,6 @@ class GLInstance PolymostRenderState renderState; FShader* activeShader; PolymostShader* polymostShader; - SurfaceShader* surfaceShader; public: @@ -172,7 +170,6 @@ public: } void SetPolymostShader(); - void SetSurfaceShader(); void SetPalette(int palette); void ReadPixels(int w, int h, uint8_t* buffer);