Ejemplo n.º 1
0
        public static Hmd CreateDebug(ovrHmdType type)
        {
            IntPtr hmdPtr = ovrHmd_CreateDebug(type);
            if (hmdPtr == IntPtr.Zero)
                return null;

            OVR_SetHMD(ref hmdPtr);
            return new Hmd(hmdPtr);
        }
Ejemplo n.º 2
0
 private static extern IntPtr ovrHmd_CreateDebug(ovrHmdType type);
Ejemplo n.º 3
0
 internal ovrHmdDesc(ovrHmdDesc_Raw raw)
 {
     this.Handle                     = raw.Handle;
     this.Type                       = (ovrHmdType)raw.Type;
     this.ProductName                = Marshal.PtrToStringAnsi(raw.ProductName);
     this.Manufacturer               = Marshal.PtrToStringAnsi(raw.Manufacturer);
     this.VendorId                   = raw.VendorId;
     this.ProductId                  = raw.ProductId;
     this.SerialNumber               = raw.SerialNumber;
     this.FirmwareMajor              = raw.FirmwareMajor;
     this.FirmwareMinor              = raw.FirmwareMinor;
     this.CameraFrustumHFovInRadians = raw.CameraFrustumHFovInRadians;
     this.CameraFrustumVFovInRadians = raw.CameraFrustumVFovInRadians;
     this.CameraFrustumNearZInMeters = raw.CameraFrustumNearZInMeters;
     this.CameraFrustumFarZInMeters  = raw.CameraFrustumFarZInMeters;
     this.HmdCaps                    = raw.HmdCaps;
     this.TrackingCaps               = raw.TrackingCaps;
     this.DistortionCaps             = raw.DistortionCaps;
     this.Resolution                 = raw.Resolution;
     this.WindowsPos                 = raw.WindowsPos;
     this.DefaultEyeFov              = new ovrFovPort[2] { raw.DefaultEyeFov_0, raw.DefaultEyeFov_1 };
     this.MaxEyeFov                  = new ovrFovPort[2] { raw.MaxEyeFov_0, raw.MaxEyeFov_1 };
     this.EyeRenderOrder = new ovrEyeType[2] { ovrEyeType.ovrEye_Left, ovrEyeType.ovrEye_Right };
     this.DisplayDeviceName          = Marshal.PtrToStringAnsi(raw.DisplayDeviceName);
     this.DisplayId                  = raw.DisplayId;
 }
Ejemplo n.º 4
0
 public extern static int ovrHmd_CreateDebug(ovrHmdType type, out IntPtr outHmd);