diff --git a/src/Core/OpenGL/CShader.cpp b/src/Core/OpenGL/CShader.cpp index 0aca62cf..08cc52d8 100644 --- a/src/Core/OpenGL/CShader.cpp +++ b/src/Core/OpenGL/CShader.cpp @@ -16,17 +16,11 @@ int CShader::smNumShaders = 0; CShader::CShader() { - mVertexShaderExists = false; - mPixelShaderExists = false; - mProgramExists = false; smNumShaders++; } CShader::CShader(const char *pkVertexSource, const char *pkPixelSource) { - mVertexShaderExists = false; - mPixelShaderExists = false; - mProgramExists = false; smNumShaders++; CompileVertexSource(pkVertexSource); diff --git a/src/Core/OpenGL/CShader.h b/src/Core/OpenGL/CShader.h index f9ba7006..b0334b18 100644 --- a/src/Core/OpenGL/CShader.h +++ b/src/Core/OpenGL/CShader.h @@ -6,22 +6,22 @@ class CShader { - bool mVertexShaderExists; - bool mPixelShaderExists; - bool mProgramExists; - GLuint mVertexShader; - GLuint mPixelShader; - GLuint mProgram; + bool mVertexShaderExists = false; + bool mPixelShaderExists = false; + bool mProgramExists = false; + GLuint mVertexShader = 0; + GLuint mPixelShader = 0; + GLuint mProgram = 0; - GLuint mMVPBlockIndex; - GLuint mVertexBlockIndex; - GLuint mPixelBlockIndex; - GLuint mLightBlockIndex; - GLuint mBoneTransformBlockIndex; + GLuint mMVPBlockIndex = 0; + GLuint mVertexBlockIndex = 0; + GLuint mPixelBlockIndex = 0; + GLuint mLightBlockIndex = 0; + GLuint mBoneTransformBlockIndex = 0; // Cached uniform locations - GLint mTextureUniforms[8]; - GLint mNumLightsUniform; + GLint mTextureUniforms[8] = {}; + GLint mNumLightsUniform = 0; static int smNumShaders; static CShader* spCurrentShader;