Add config option to dump shaders
This commit is contained in:
parent
eb248e6c36
commit
e23db47d3a
@ -214,7 +214,16 @@ namespace LayoutBXLYT
|
||||
|
||||
var info = GL.GetProgramInfoLog(program);
|
||||
if (!string.IsNullOrWhiteSpace(info))
|
||||
{
|
||||
if (Toolbox.Library.Runtime.DumpShadersDEBUG)
|
||||
if (!System.IO.Directory.Exists("ShaderDump"))
|
||||
System.IO.Directory.CreateDirectory("ShaderDump");
|
||||
|
||||
System.IO.File.WriteAllText($"ShaderDump/ShaderError_VS[{vertexShader}]_FS[{fragmentShader}].txt",
|
||||
info + VertexShader + FragmentShader);
|
||||
|
||||
Console.WriteLine($"GL.LinkProgram had info log: {info}");
|
||||
}
|
||||
|
||||
GL.DetachShader(program, vertexShader);
|
||||
GL.DetachShader(program, fragmentShader);
|
||||
|
@ -295,7 +295,10 @@ namespace Toolbox.Library
|
||||
case "TransformPaneChidlren":
|
||||
bool.TryParse(node.InnerText, out Runtime.LayoutEditor.TransformChidlren);
|
||||
break;
|
||||
|
||||
case "DumpShadersDEBUG":
|
||||
bool.TryParse(node.InnerText, out Runtime.DumpShadersDEBUG);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -438,12 +441,12 @@ namespace Toolbox.Library
|
||||
XmlNode mainSettingsNode = doc.CreateElement("MAINFORM");
|
||||
parentNode.AppendChild(mainSettingsNode);
|
||||
|
||||
|
||||
mainSettingsNode.AppendChild(createNode(doc, "UseSingleInstance", Runtime.UseSingleInstance.ToString()));
|
||||
mainSettingsNode.AppendChild(createNode(doc, "UseDirectXTexDecoder", Runtime.UseDirectXTexDecoder.ToString()));
|
||||
mainSettingsNode.AppendChild(createNode(doc, "AlwaysCompressOnSave", Runtime.AlwaysCompressOnSave.ToString()));
|
||||
mainSettingsNode.AppendChild(createNode(doc, "DisplayViewport", Runtime.DisplayViewport.ToString()));
|
||||
mainSettingsNode.AppendChild(createNode(doc, "UseOpenGL", Runtime.UseOpenGL.ToString()));
|
||||
mainSettingsNode.AppendChild(createNode(doc, "DumpShadersDEBUG", Runtime.DumpShadersDEBUG.ToString()));
|
||||
mainSettingsNode.AppendChild(createNode(doc, "UseDebugDomainExceptionHandler", Runtime.UseDebugDomainExceptionHandler.ToString()));
|
||||
mainSettingsNode.AppendChild(createNode(doc, "OpenStartupWindow", Runtime.OpenStartupWindow.ToString()));
|
||||
mainSettingsNode.AppendChild(createNode(doc, "EnableVersionCheck", Runtime.EnableVersionCheck.ToString()));
|
||||
|
@ -20,6 +20,8 @@ namespace Toolbox.Library
|
||||
|
||||
public static bool EnableDragDrop = true;
|
||||
|
||||
public static bool DumpShadersDEBUG = false;
|
||||
|
||||
public static bool UseSingleInstance = false;
|
||||
public static bool UseDirectXTexDecoder = true;
|
||||
public static bool DEVELOPER_DEBUG_MODE = false;
|
||||
|
Loading…
Reference in New Issue
Block a user