1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

delete both shaders on failure

This commit is contained in:
FunkyFr3sh 2018-05-13 19:43:03 +02:00
parent fd4a893729
commit 51d499758d
2 changed files with 3 additions and 2 deletions

View File

@ -182,7 +182,10 @@ GLuint OpenGL_BuildProgram(const GLchar *vertSource, const GLchar *fragSource)
if (isCompiled == GL_FALSE)
{
if (glDeleteShader)
{
glDeleteShader(fragShader);
glDeleteShader(vertShader);
}
return 0;
}

View File

@ -22,7 +22,6 @@
#include "surface.h"
const GLchar *PassthroughVertShaderSrc =
"//Vertex shader\n"
"#version 110\n"
"varying vec2 TexCoord0; \n"
"\n"
@ -33,7 +32,6 @@ const GLchar *PassthroughVertShaderSrc =
"}\n";
const GLchar *PaletteFragShaderSrc =
"//Fragment shader\n"
"#version 110\n"
"uniform sampler2D PaletteTex; \n"
"uniform sampler2D SurfaceTex; \n"