基于DX11的OculusVR 渲染接口实现
DX11绘制其实就是不断的刷新并提交,为了支持默认绘制模式和VR绘制模式,我们设计一个接口,供系统启动时默认加载,也运行在使用过程中进行切换。
1 | public interface IDrawContext : IDisposable |
在主程序中使用渲染接口:
1 | public sealed partial class Root |
默认绘制方式如下:
1 | public class MonoralDrawContext : IDrawContext |
Oculus的绘制实现类如下:
1 | public class StereoDrawContext : IDrawContext |