From c606346ae3b9e228308886652aeffcf018336c0b Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Thu, 21 Feb 2019 21:23:44 +0100 Subject: [PATCH] - remove dead code --- src/rendering/gl/shaders/gl_shader.cpp | 1 - src/rendering/gl/shaders/gl_shader.h | 15 ++++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/rendering/gl/shaders/gl_shader.cpp b/src/rendering/gl/shaders/gl_shader.cpp index 0dedd69668..99b414decb 100644 --- a/src/rendering/gl/shaders/gl_shader.cpp +++ b/src/rendering/gl/shaders/gl_shader.cpp @@ -539,7 +539,6 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char * muTimer.Init(hShader, "timer"); lights_index = glGetUniformLocation(hShader, "lights"); - fakevb_index = glGetUniformLocation(hShader, "fakeVB"); modelmatrix_index = glGetUniformLocation(hShader, "ModelMatrix"); texturematrix_index = glGetUniformLocation(hShader, "TextureMatrix"); normalmodelmatrix_index = glGetUniformLocation(hShader, "NormalModelMatrix"); diff --git a/src/rendering/gl/shaders/gl_shader.h b/src/rendering/gl/shaders/gl_shader.h index c9f4ce72cd..546ad9d921 100644 --- a/src/rendering/gl/shaders/gl_shader.h +++ b/src/rendering/gl/shaders/gl_shader.h @@ -264,10 +264,6 @@ class FShader int normalmodelmatrix_index; int texturematrix_index; - -public: - int fakevb_index; -private: int currentglowstate = 0; int currentgradientstate = 0; int currentsplitstate = 0; @@ -287,10 +283,6 @@ public: bool Load(const char * name, const char * vert_prog_lump, const char * fragprog, const char * fragprog2, const char * light_fragprog, const char *defines); - void SetColormapColor(float r, float g, float b, float r1, float g1, float b1); - void SetGlowParams(float *topcolors, float topheight, float *bottomcolors, float bottomheight); - void SetLightRange(int start, int end, int forceadd); - bool Bind(); unsigned int GetHandle() const { return hShader; } }; @@ -306,15 +298,16 @@ public: FShaderManager(); ~FShaderManager(); - void SetActiveShader(FShader *sh); - FShader *GetActiveShader() const { return mActiveShader; } - FShader *BindEffect(int effect, EPassType passType); FShader *Get(unsigned int eff, bool alphateston, EPassType passType); private: + void SetActiveShader(FShader *sh); + FShader *mActiveShader = nullptr; TArray mPassShaders; + + friend class FShader; }; class FShaderCollection