Tested with Clang 12.0.0
git clone --recursive https://github.com/rleathart/librgl
cmake -B build
cmake --build build
cmake --install build
cmake -B build -DRGL_BUILD_TESTS=ON
cmake --build build --target test
Directory | Contains |
---|---|
include | Public headers. |
src | All library source code and private headers. |
test | Source code for unit/functional tests. |
Variables and functions should be snake_case. Global variables should be
prefixed with g_
, thread local variables should be prefixed with t_
.
Type names are CamelCase.
Macro names are UPPER_SNAKE_CASE.
For datastructures that have constructors with the signature
void datastructure_new(DataStructure* self, ...)
their corresponding free
functions shall be responsible for freeing only the
data contained in the datastructure, and not the variable self
. This is
because the constructor signature gives the caller the option to allocate on the
stack or the heap. As such, the caller shall be responsible for freeing self
.