Blog Posts

Resource Tickets

When writing 3D software, I need to parse scene files that load or create various resources into memory. Sometimes, several scenes will be parsed that may request the same data, without a way to communicate; in this case, I want them to share this data automatically.

C++ Templates

A Really Dumb Pointer

I like the idea of std::observer_ptr as a drop-in replacement for raw pointers that explicitly refuse ownership. However, this experimental feature is too permissive to my taste, and does not prevent potential misuses.

C++ Templates

Compile Time Swizzling

In GLSL code, swizzling offers a handy syntax to manipulate vectors. Solutions were found to reproduce this in C++, that each have their shortcomings.

C++ Sugar Templates

UBO Convenience Class

In this post, we will create a UBO class template that handles boilerplate OpenGL code and offers a simple syntax to write data inside the buffer.

C++ OpenGL Sugar