From e7feddaea5c54ed5a674a840ddd7ddbf186c6641 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Wed, 27 Sep 2023 16:25:56 +0200 Subject: [PATCH] fix stupid merge --- src/OpenGLSupport.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/OpenGLSupport.cpp b/src/OpenGLSupport.cpp index 207dd450..0c793fac 100644 --- a/src/OpenGLSupport.cpp +++ b/src/OpenGLSupport.cpp @@ -274,12 +274,13 @@ bool CompileComputeProgram(GLuint& result, const std::string& source, const std: }*/ Log(LogLevel::Error, "Shader %s from cache was rejected\n", name.c_str()); - GLuint shader = glCreateShader(GL_COMPUTE_SHADER); + GLuint shader; bool linkingSucess = false; - if (glDeleteProgram) - { // If OpenGL isn't loaded, then there's no shader program to delete + + if (!glCreateShader || !glDeleteShader) goto error; - } + + shader = glCreateShader(GL_COMPUTE_SHADER); if (!CompilerShader(shader, source, name, "compute")) goto error;