From bcefd6f2d707343ebfc6bc16ec5191da61ba2b2a Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 24 Aug 2015 13:36:25 -0500 Subject: [PATCH] fix mistake requiring optional shaders to succeed compiling and add printfs of compilation errors --- .../BizHawk.Bizware.BizwareGL.OpenTK/IGL_TK.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Bizware/BizHawk.Bizware.BizwareGL.OpenTK/IGL_TK.cs b/Bizware/BizHawk.Bizware.BizwareGL.OpenTK/IGL_TK.cs index 68d7d2af12..5d2b7914a1 100644 --- a/Bizware/BizHawk.Bizware.BizwareGL.OpenTK/IGL_TK.cs +++ b/Bizware/BizHawk.Bizware.BizwareGL.OpenTK/IGL_TK.cs @@ -177,12 +177,8 @@ namespace BizHawk.Bizware.BizwareGL.Drivers.OpenTK public List SamplerLocs; } - static int poop = 0; - public Pipeline CreatePipeline(VertexLayout vertexLayout, Shader vertexShader, Shader fragmentShader, bool required, string memo) { - required = true; - poop++; bool success = true; var vsw = vertexShader.Opaque as ShaderWrapper; @@ -721,9 +717,16 @@ namespace BizHawk.Bizware.BizwareGL.Drivers.OpenTK string resultLog = GL.GetShaderInfoLog(sid); if (errcode != ErrorCode.NoError) + { + string message = "Error compiling shader (CompileShader) " + errcode + "\r\n\r\n" + resultLog; if (required) - throw new InvalidOperationException("Error compiling shader (CompileShader) " + errcode + "\r\n\r\n" + resultLog); - else success = false; + throw new InvalidOperationException(message); + else + { + Console.WriteLine(message); + success = false; + } + } int n; GL.GetShader(sid, ShaderParameter.CompileStatus, out n);