From 6cf67f9e4fecdd74e44640441129a900e3ff1f87 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 19 Feb 2018 11:54:09 +0000 Subject: [PATCH] Display matrices in multiple lines instead of a single line * This makes it easier to preview without expanding the variables, and also clarifies the row/column distinction in a "float3x4" since it's immediately clear how many rows there are. --- qrenderdoc/Code/FormatElement.cpp | 4 ++-- qrenderdoc/Windows/ConstantBufferPreviewer.ui | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Code/FormatElement.cpp b/qrenderdoc/Code/FormatElement.cpp index f1275f661..a4cd0a909 100644 --- a/qrenderdoc/Code/FormatElement.cpp +++ b/qrenderdoc/Code/FormatElement.cpp @@ -903,11 +903,11 @@ QString VarString(const ShaderVariable &v) for(int i = 0; i < (int)v.rows; i++) { if(i > 0) - ret += lit(", "); + ret += lit("\n"); ret += lit("{") + RowString(v, i) + lit("}"); } - return lit("{ ") + ret + lit(" }"); + return ret; } QString RowTypeString(const ShaderVariable &v) diff --git a/qrenderdoc/Windows/ConstantBufferPreviewer.ui b/qrenderdoc/Windows/ConstantBufferPreviewer.ui index 4b9d39a82..ff2a3f16b 100644 --- a/qrenderdoc/Windows/ConstantBufferPreviewer.ui +++ b/qrenderdoc/Windows/ConstantBufferPreviewer.ui @@ -211,6 +211,9 @@ QAbstractItemView::ContiguousSelection + + QAbstractItemView::ScrollPerPixel + true