From 5425a9d423af81f7164d002a660ce31f424f78fe Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 19 Jan 2015 02:08:35 +0000 Subject: [PATCH] Allow opengl types in buffer format string parsing --- renderdocui/Code/FormatElement.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/renderdocui/Code/FormatElement.cs b/renderdocui/Code/FormatElement.cs index f7b8b1a43..17c85fcb6 100644 --- a/renderdocui/Code/FormatElement.cs +++ b/renderdocui/Code/FormatElement.cs @@ -323,6 +323,8 @@ namespace renderdocui.Code @"|ubyte|ushort|uint" + // unsigned ints @"|xbyte|xshort|xint" + // hex ints @"|half|float|double" + // float types + @"|vec|uvec|ivec" + // OpenGL vector types + @"|mat|umat|imat" + // OpenGL matrix types @")" + @"([1-9])?" + // might be a vector @"(x[1-9])?" + // or a matrix @@ -435,12 +437,12 @@ namespace renderdocui.Code type = FormatComponentType.UInt; width = 2; } - else if (basetype == "int") + else if (basetype == "int" || basetype == "ivec" || basetype == "imat") { type = FormatComponentType.SInt; width = 4; } - else if (basetype == "uint" || basetype == "xint") + else if (basetype == "uint" || basetype == "xint" || basetype == "uvec" || basetype == "umat") { type = FormatComponentType.UInt; width = 4; @@ -450,7 +452,7 @@ namespace renderdocui.Code type = FormatComponentType.Float; width = 2; } - else if (basetype == "float") + else if (basetype == "float" || basetype == "vec" || basetype == "mat") { type = FormatComponentType.Float; width = 4;