VPVR uses OpenGL and SDL2 for rendering.
Reason: OpenVR does not support DX9, so I had to change the rendering API. And for a future Linux port OpenGL is not the worst choice.
All static rendering is moved to the dynamic rendering loop.
PrepareVideoBuffersNormal() and PrepareVideoBuffersAO() were merged to PostProcess(const bool ambientOcclusion)
Several DX9 function calls, types, enums... were encapsulated to minimize the code difference between OpenGL and DX9.
Shader, VertexBuffer, IndexBuffer and TextureManager classes were moved from RenderDevice to their own files. Also the Shader class was split up in Shader.cpp for common functions, and ShaderDX9.cpp and ShaderGL.cpp for engine specific functions. This would also make sense for the other classes (or using C++ inheritance). At the moment everything is controlled by ENABLE_VR and ENABLE_SDL for switching. This was convinient while porting to OpenGL, but I would not call it best practice.
Shaders were transformed into a format that I called glfx. This format is a little bit weird, but I tried to keep the shader format as close as possible to the .fx files from DX9.
Table mirroring is disabled since it consumes a lot of performance and modern OpenGL does not support arbitrary clipping planes. ATM performance is more important than table mirroring.
Although VPVR is linked against SDL2_TTF, font rendering for debugging is not working yet.