Skip to content

Source Code

Alex Dixon edited this page Jan 16, 2021 · 17 revisions

Coding Philosophy

Header files keep nice clean minimal procedural interfaces and cpp files hide the implementations, for this reason hopefully looking in the header files should provide decent code documentation through comments and clearly named functions.

There is a clang format for consistent style.

Other key points to coding style:

  • Minimalistic.
  • Data oriented.
  • Shallow call stacks.
  • Minimise dependencies in headers.
  • Hide implementation in cpp files.
  • Prefer pure functions.
  • Limited use of dynamic polymorphism.
  • Multithreaded systems using command buffers to communicate.
  • Avoid over engineering.

Navigating the source

pmtech is split into 2 static libraries, pen and put

This is to separate platform specific code from generic code, when coming to port a platform it is only necessary to ensure pen compiles and then everything in put comes along for the ride.

pen contains platform specific code and abstractions for the following:

put contains platform agnostic code using the abstractions provided by pen, it contains the following modules:

Clone this wiki locally