Simple graphics pipeline in C++