Kaydet (Commit) 56d45b72 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

make sure that we always delete the shader and not only the program

Change-Id: Ia02fb20d335e2172f607f13a0de78ea666d094f5
üst 161931ba
......@@ -122,6 +122,9 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,const OUString
glAttachShader(ProgramID, FragmentShaderID);
glLinkProgram(ProgramID);
glDeleteShader(VertexShaderID);
glDeleteShader(FragmentShaderID);
// Check the program
glGetProgramiv(ProgramID, GL_LINK_STATUS, &Result);
if ( !Result )
......@@ -140,9 +143,6 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,const OUString
return 0;
}
glDeleteShader(VertexShaderID);
glDeleteShader(FragmentShaderID);
return ProgramID;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment