Commit Graph

5 Commits

Author SHA1 Message Date
blat-blatnik
2cc2c3ae6e
Added features to the .natvis file
I've been using this natvis file in some personal projects that use GLM and I've found it to be very helpful when debugging GLM code.

vectors are displayed in the debugger like this:

glm::vec4 v(1, 2, 3, 4); // [1 2 3 4]

when expanding the view, the debugger will show each individual component, as well as the length of the vector, and hex RGBA code (for float vectors only), like this:

glm::vec4 v(0.5); // [0.5 0.5 0.5 0.5]

[len]   1
[rgba] #7F7F7F7F
x         0.5
y         0.5
z         0.5
w        0.5

Matrices are displayed in row major order when expanded in the debugger like this:

glm::mat4 m = glm::translate(glm::mat4(1), glm::vec3(1, 2, 3));
// [1 0 0 0] [0 1 0 0] [0 0 1 0] [1 2 3 1]

row 1   [1 0 0 1]
row 2   [0 1 0 2]
row 3   [0 0 1 3]
row 4   [0 0 0 1]
columns
  - col 1    [1 0 0 0]
  - col 2    [0 1 0 0]
  - col 3    [0 0 1 0]
  - col 4    [1 2 3 1]

Quaternions are displayed as: w + xi + yj + zk

glm::quat q(1, 2, 3, 4); // 1 + 2i + 3j + 4k

Dual quaternions are displayed as:

glm::dualquat dq(q, q); // [r: 1 + 2i + 3j + 4k] [d: 1 + 2i + 3j + 4k]
2020-04-17 00:35:24 +02:00
Ken Hu
3d9bec8d2b Fix .natvis as structs renamed 2019-06-18 00:04:55 +09:00
Christophe Riccio
1e0825028e Fixed Visual Studio natvis support for vec4 #288, Added Visual Studio natvis support for vec1, quat and dualqual types 2015-01-09 01:37:16 +01:00
Christophe Riccio
bc9aaa4033 Fixed glm.natvis, issue #82 2013-05-16 13:49:54 +00:00
Jonathan Lima
7d9c22094c Added debbugger visualizers for Visual Studio 2012.
Signed-off-by: Jonathan Lima <greenboxal@gmail.com>
2012-10-05 11:56:50 -03:00