diff options
| author | Ray San <[email protected]> | 2017-10-17 13:32:15 +0200 |
|---|---|---|
| committer | Ray San <[email protected]> | 2017-10-17 13:32:15 +0200 |
| commit | 7057d083692f51a3d89734da81fa4db76705987f (patch) | |
| tree | 5656f4ae7ed9aa06f21dd521f1b38228eb7f4cdb /src/raylib.h | |
| parent | 8ace02c2ffd9dead6e67fb3faaaa8b8ad37ccd2a (diff) | |
| download | raylib-7057d083692f51a3d89734da81fa4db76705987f.tar.gz raylib-7057d083692f51a3d89734da81fa4db76705987f.zip | |
Review VR functionality
To be more generic and configurable
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/raylib.h b/src/raylib.h index 288fd8d9..392e0a24 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -523,6 +523,20 @@ typedef struct RRESData { // RRES type (pointer to RRESData array) typedef struct RRESData *RRES; +// Head-Mounted-Display device parameters +typedef struct VrDeviceInfo { + int hResolution; // HMD horizontal resolution in pixels + int vResolution; // HMD vertical resolution in pixels + float hScreenSize; // HMD horizontal size in meters + float vScreenSize; // HMD vertical size in meters + float vScreenCenter; // HMD screen center in meters + float eyeToScreenDistance; // HMD distance between eye and display in meters + float lensSeparationDistance; // HMD lens separation distance in meters + float interpupillaryDistance; // HMD IPD (distance between pupils) in meters + float lensDistortionValues[4]; // HMD lens distortion constant parameters + float chromaAbCorrection[4]; // HMD chromatic aberration correction parameters +} VrDeviceInfo; + //---------------------------------------------------------------------------------- // Enumerators Definition //---------------------------------------------------------------------------------- @@ -665,13 +679,10 @@ typedef enum { HMD_DEFAULT_DEVICE = 0, HMD_OCULUS_RIFT_DK2, HMD_OCULUS_RIFT_CV1, + HMD_OCULUS_GO, HMD_VALVE_HTC_VIVE, - HMD_SAMSUNG_GEAR_VR, - HMD_GOOGLE_CARDBOARD, - HMD_SONY_PLAYSTATION_VR, - HMD_RAZER_OSVR, - HMD_FOVE_VR, -} VrDevice; + HMD_SONY_PSVR +} VrDeviceType; // RRESData type typedef enum { @@ -1083,7 +1094,8 @@ RLAPI void BeginBlendMode(int mode); // Beg RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending) // VR control functions -RLAPI void InitVrSimulator(int vrDevice); // Init VR simulator for selected device +VrDeviceInfo GetVrDeviceInfo(int vrDeviceType); // Get VR device information for some standard devices +void InitVrSimulator(VrDeviceInfo info); // Init VR simulator for selected device parameters RLAPI void CloseVrSimulator(void); // Close VR simulator for current device RLAPI bool IsVrSimulatorReady(void); // Detect if VR simulator is ready RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera |
