redstrate.com/content/blog/drawing-simple-cubes/index.md
2023-06-24 09:25:16 -04:00

702 B

title date draft summary tags series
Graphics Dump: Drawing debug cubes 2023-06-28 true When working on my engine, I wanted to clean up my debug gizmos a bit. The first thing to tackle is drawing bounding boxes!
C++
Graphics Dump
Math
Graphics Dump

If you are writing graphical tools, one of the most common shapes you draw is boxes. They can represent areas (like the affected area of an environment capture) or a box collision.

One common problem that I run into, is dealing with these diagonals:

I found a pretty neat trick for removing these diagonals without having to change the vertex data. This doesn't work for anything that isn't a cube (I think), but whatever.