Inside the companion
Build your studio
Two small CMake checkpoints: one executable, then a library with tests and presets.
Project files 9
Consume your own library
Call the checker API and print a few known intensities.
#include "studio/checker.hpp"
#include <iostream>
int main() {
std::cout << "checker: "
<< static_cast<int>(studio::shade(0, 0)) << ' '
<< static_cast<int>(studio::shade(2, 0)) << ' '
<< static_cast<int>(studio::shade(2, 2)) << '\n';
std::cout.flush();
return std::cout ? 0 : 1;
}
This is the file included with the course. Copy and download give you its complete source.
Taking your work offline? Download all course companions
