Skip to main content

C/Cpp

2020

Vulkan Enum Stringifier Project - Quick Postmortem
·1408 words·7 mins
Code Vulkan C/Cpp Postmortem
A better present from a worse past. Also odd Vulkan spec anomalies.

2019

EntityID - Using one value to share many
·693 words·4 mins
Code Entity-Component-System C/Cpp
One of the most fundamental items in any system, software or otherwise, is to be able to identify something uniquely.

2018

Using CMake to help build Catch2 tests
·653 words·4 mins
Code Cmake C/Cpp
Using CMake to automatically detect, or clone fresh, and even pre-compile Catch for you.
The Alternate Compilers of Windows
·1232 words·6 mins
Code Windows C/Cpp
While Microsoft’s MSVC may be synonymous with Windows development, there are others.
Collecting scalar values together in C++11
·983 words·5 mins
Code C/Cpp
Making life easier through enum flags, structs and offsets, and recreating Fallout’s SPECIAL reliably, quickly, efficiently, and safely.
Integrating Sanitizer tools into CMake builds
·990 words·5 mins
Code Cmake C/Cpp
Previously we added tools for code coverage and static analysis via clang-tidy. Now comes the ability to perform better runtime testing through GCC and Clang’s sanitizer tools, and integrating them with CMake.
Adding C/C++ code coverage with CMake and GCC or Clang
·752 words·4 mins
Code Cmake C/Cpp
Code coverage gives the ability to determine which sections of code are used, and how much, helping to prevent issues from sections of code that aren’t run during tests and thus could potentially fail in production.

2017

Fixed Point Precision Type
·854 words·5 mins
Code C/Cpp
One of the most valuable basic types in computer science is the floating point type. The float is that allows for a massive range of storable values, at the cost of some precision after the value becomes large enough, due to the fact that floats can only store ~7.2 decimal digits. Thus, if we wish to keep a certain fixed amount or precision, we need to either put coded limits around the use of particular floats, or just create our own fixed point type.
SPIR-V Shader Binary Converter
·691 words·4 mins
Code Vulkan C/Cpp
To accomplish this, the program reads in the generated SPIR-V binary, and outputs a text file containing the data, but in 4 byte chunks, so that it can be used as if it were a uint32 array.