Vertices – Packing and More

If you’ve delved into 3d graphics for more than 5 seconds, you’ll know what a vertex is.  It’s a position, plus a bunch of other day.  Today I’d like to go over 2 topics related to vertices, which will be relevant to a post I plan to make in the future; how vertex data is stored, and how that data is arranged in memory.

Continue reading

VMath, part 1: Vectors

For my first actual content post, I thought I’d dig in to what I’ve written on the math side of things, and explain how it all works and why I chose the things I chose.  For this, and all future programming posts, the language of choice will be C++.

First thing to note, is that a lot of programmers who find themselves without a provided math library (such as is the case when working with OpenGL like me, or Vulkan) will usually end up using GLM.  There’s nothing particularly wrong with GLM, and if you aren’t especially math-inclined, then I honestly suggest you use it too.  The reason that I don’t use GLM is that, by its own admission, it’s designed for “the 90% of your code that does 10% of the work”.  That’s all fine and dandy until you start writing that other 10%, and now you need to optimize.  Without understanding how the math really works, and how your math library is doing its job, you can’t make those vital optimizations to the most important parts of the code.  Still, if you aren’t math-inclined, you can feel free to skip any VMath posts and simply use GLM as a drop-in replacement; the interface is very similar, by design.

Continue reading