Recent Articles

Precompile dependencies for cmake

Dependencies C++ projects often requires dependencies especially when intending to build a fast demo. There are innumberable C++ libraries releasing as source code on github. Import a package Unlike modern languages like go or rust, it’s not an easy work to import a C++ package. C++ inherits the “old fashion style” build process from C, including several separated stages. To import a C++ package, you either: Import dependencies as source codes and build with your project at once.

2024-12-04  

"Delete" abseil's default log sink

Abseil’s logging library I like google’s code syntax of logging, it’s more clean than spdlog. The log library is available from glog or abseil. Abseil also contains a bunch of utilities and remains quite lightweight. (Yes, I’m looking at you, boost). It’s so great to have all of them by adding only one dependency. This is the first time I’m working with abseil’s logging module with vscode and got some trubble.

2024-09-15  

Quaternion

Use glm::quat as example

2024-06-09  

The GLAD Library

Platform compatible Rendering is not a easy work, it needs both software and hardware support. Unfortunately, there are more than one software/hardware renderer vendor on earth. For hardware OpenGL tries to unify different device driver interfaces. It is a standard rather than a library, so OpenGL never provides implementation for rendering. GPU vendors offer the implementation. Any program needs to use OpenGL has to load implementation dynamically, writing some dynamic linking code like this:

2023-12-14  

Implement Raft

6.824 Lab 2: Raft

2022-01-31  

藏在栈里的金丝雀

缓冲区溢出检测

2021-04-25