From 73c3f198f4188629eb3bcac123f8516135a86a4c Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 16 Dec 2011 23:37:22 -0600 Subject: [PATCH] Only delete this buffer if we support it. --- .../Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index 98efbb000b..c90f151421 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -186,9 +186,12 @@ namespace OGL iter->second.Destroy(); pshaders.clear(); - glBindBuffer(GL_UNIFORM_BUFFER, 0); - glDeleteBuffers(1, &s_ps_vs_ubo); - s_ps_vs_ubo = 0; + if (g_ActiveConfig.backend_info.bSupportsGLSLUBO) + { + glBindBuffer(GL_UNIFORM_BUFFER, 0); + glDeleteBuffers(1, &s_ps_vs_ubo); + s_ps_vs_ubo = 0; + } } }