Converted back to c++. Using OpenGL instead of DirectX