Custom 3D renderer in C++