diff --git a/src/gl/shaders/gl_shaderprogram.cpp b/src/gl/shaders/gl_shaderprogram.cpp index 63ce09261..959315a9d 100644 --- a/src/gl/shaders/gl_shaderprogram.cpp +++ b/src/gl/shaders/gl_shaderprogram.cpp @@ -52,6 +52,12 @@ #include "i_system.h" #include "doomerrors.h" +FShaderProgram::FShaderProgram() +{ + for (int i = 0; i < NumShaderTypes; i++) + mShaders[i] = 0; +} + //========================================================================== // // Free shader program resources diff --git a/src/gl/shaders/gl_shaderprogram.h b/src/gl/shaders/gl_shaderprogram.h index 16684ddff..64a36db49 100644 --- a/src/gl/shaders/gl_shaderprogram.h +++ b/src/gl/shaders/gl_shaderprogram.h @@ -6,6 +6,7 @@ class FShaderProgram { public: + FShaderProgram(); ~FShaderProgram(); enum ShaderType @@ -30,6 +31,9 @@ public: static void PatchFragShader(FString &code); private: + FShaderProgram(const FShaderProgram &) = delete; + FShaderProgram &operator=(const FShaderProgram &) = delete; + static FString PatchShader(ShaderType type, const FString &code, const char *defines, int maxGlslVersion); static void PatchCommon(FString &code);