From 480b39ff492372dfeada0adb175d4c939b8679a0 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 6 Nov 2014 19:20:03 +0000 Subject: [PATCH] dont malfunction when compiling retro shaders on systems with bad opengl support. i shouldve been swallowing this error and calling the shader failed instead of throwing an exception. should fix some people with purportedly 'broken' drivers. --- Bizware/BizHawk.Bizware.BizwareGL.OpenTK/IGL_TK.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Bizware/BizHawk.Bizware.BizwareGL.OpenTK/IGL_TK.cs b/Bizware/BizHawk.Bizware.BizwareGL.OpenTK/IGL_TK.cs index 75eb97315e..06142684b9 100644 --- a/Bizware/BizHawk.Bizware.BizwareGL.OpenTK/IGL_TK.cs +++ b/Bizware/BizHawk.Bizware.BizwareGL.OpenTK/IGL_TK.cs @@ -560,8 +560,10 @@ namespace BizHawk.Bizware.BizwareGL.Drivers.OpenTK ErrorCode errcode; errcode = GL.GetError(); - if (errcode != ErrorCode.NoError) - throw new InvalidOperationException("Error compiling shader (from previous operation) " + errcode); + if (errcode != ErrorCode.NoError) + if (required) + throw new InvalidOperationException("Error compiling shader (from previous operation) " + errcode); + else success = false; GL.ShaderSource(sid, source);