mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Oculus VR DK2 Support
- Updated to work with 0.5.x SDK - Uses Oculus Rendering rather than PostFX - Stereo rendering refactored so more rendering info is grabbed from the DisplayDevice - Implements an Offscreen Canvas for in-game gui with oculus - Message dialogs and metrics display can now go to the OffScreen Canvas (if oculus demo is setup correctly)
This commit is contained in:
parent
b3170bcddf
commit
3a457749ec
56 changed files with 2654 additions and 1426 deletions
|
|
@ -25,20 +25,44 @@
|
|||
|
||||
#include "console/consoleTypes.h"
|
||||
|
||||
class GameConnection;
|
||||
class GuiCanvas;
|
||||
|
||||
// Defines a custom display device that requires particular rendering settings
|
||||
// in order for a scene to display correctly.
|
||||
|
||||
/// Defines the basic display pose common to most display devices
|
||||
typedef struct DisplayPose
|
||||
{
|
||||
EulerF orientation; /// Direction device is facing
|
||||
Point3F position; /// Relative position of device in view space
|
||||
} IDevicePose;
|
||||
|
||||
class IDisplayDevice
|
||||
{
|
||||
public:
|
||||
virtual bool providesYFOV() const = 0;
|
||||
virtual F32 getYFOV() const = 0;
|
||||
virtual bool providesFrameEyePose() const = 0;
|
||||
virtual void getFrameEyePose(IDevicePose *pose, U32 eye) const = 0;
|
||||
|
||||
virtual bool providesEyeOffset() const = 0;
|
||||
virtual const Point3F& getEyeOffset() const = 0;
|
||||
virtual bool providesEyeOffsets() const = 0;
|
||||
/// Returns eye offset not taking into account any position tracking info
|
||||
virtual void getEyeOffsets(Point3F *dest) const = 0;
|
||||
|
||||
virtual bool providesFovPorts() const = 0;
|
||||
virtual void getFovPorts(FovPort *out) const = 0;
|
||||
|
||||
virtual bool providesProjectionOffset() const = 0;
|
||||
virtual const Point2F& getProjectionOffset() const = 0;
|
||||
|
||||
virtual void getStereoViewports(RectI *out) const = 0;
|
||||
virtual void getStereoTargets(GFXTextureTarget **out) const = 0;
|
||||
|
||||
virtual void setDrawCanvas(GuiCanvas *canvas) = 0;
|
||||
|
||||
virtual void setCurrentConnection(GameConnection *connection) = 0;
|
||||
virtual GameConnection* getCurrentConnection() = 0;
|
||||
|
||||
virtual void onStartFrame() = 0;
|
||||
};
|
||||
|
||||
#endif // _IDISPLAYDEVICE_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue