Guest User

ovr.h

a guest
Apr 21st, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.20 KB | None | 0 0
  1. #pragma once
  2. #include <eight/vr/vr.h>
  3. //------------------------------------------------------------------------------
  4. namespace eight {
  5. //------------------------------------------------------------------------------
  6.  
  7. class OculusDevice : Interface<OculusDevice>
  8. {
  9. public:
  10.     void GetRenderTargetSize( uint& w, uint& h ) const;
  11.     u32 GetRenderTargetFlags() const;
  12.     void GetAdapter( GfxAdapterId& ) const;
  13.     void Attach( OsWindow&, GpuDevice&, TextureId backBuffer, TextureId left, TextureId right, u32 textureWidth, u32 textureHeight );
  14.     void GetViewports( Viewport views[2] );
  15.     void GetViewData( ViewData views[2], float near, float far );
  16.     bool BeginFrame( GpuDevice& gpu );//if false, you must still call EndFrame, but nothing will be displayed
  17.     bool EndFrame(GpuDevice& gpu);//if false, device is lost...
  18. private:
  19.     ~OculusDevice();
  20. };
  21.  
  22. class OculusSystem : Interface<OculusSystem>
  23. {
  24. public:
  25.     OculusSystem();
  26.     OculusDevice* CreateDevice( Scope&, GpuInterface&, OsWindowArgs* );
  27. private:
  28.     ~OculusSystem();
  29. };
  30.  
  31. //------------------------------------------------------------------------------
  32. } // namespace eight
  33. //------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment