fix mistake requiring optional shaders to succeed compiling and add printfs of compilation errors
This commit is contained in:
parent
f20a77790d
commit
bcefd6f2d7
|
@ -177,12 +177,8 @@ namespace BizHawk.Bizware.BizwareGL.Drivers.OpenTK
|
||||||
public List<int> SamplerLocs;
|
public List<int> SamplerLocs;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int poop = 0;
|
|
||||||
|
|
||||||
public Pipeline CreatePipeline(VertexLayout vertexLayout, Shader vertexShader, Shader fragmentShader, bool required, string memo)
|
public Pipeline CreatePipeline(VertexLayout vertexLayout, Shader vertexShader, Shader fragmentShader, bool required, string memo)
|
||||||
{
|
{
|
||||||
required = true;
|
|
||||||
poop++;
|
|
||||||
bool success = true;
|
bool success = true;
|
||||||
|
|
||||||
var vsw = vertexShader.Opaque as ShaderWrapper;
|
var vsw = vertexShader.Opaque as ShaderWrapper;
|
||||||
|
@ -721,9 +717,16 @@ namespace BizHawk.Bizware.BizwareGL.Drivers.OpenTK
|
||||||
string resultLog = GL.GetShaderInfoLog(sid);
|
string resultLog = GL.GetShaderInfoLog(sid);
|
||||||
|
|
||||||
if (errcode != ErrorCode.NoError)
|
if (errcode != ErrorCode.NoError)
|
||||||
|
{
|
||||||
|
string message = "Error compiling shader (CompileShader) " + errcode + "\r\n\r\n" + resultLog;
|
||||||
if (required)
|
if (required)
|
||||||
throw new InvalidOperationException("Error compiling shader (CompileShader) " + errcode + "\r\n\r\n" + resultLog);
|
throw new InvalidOperationException(message);
|
||||||
else success = false;
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine(message);
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int n;
|
int n;
|
||||||
GL.GetShader(sid, ShaderParameter.CompileStatus, out n);
|
GL.GetShader(sid, ShaderParameter.CompileStatus, out n);
|
||||||
|
|
Loading…
Reference in New Issue