private void sideBySideCrossEyedToolStripMenuItem_Click(object sender, EventArgs e) { if (rift) { rift = false; AttachRenderWindow(); } StereoMode = StereoModes.CrossEyed; Properties.Settings.Default.ColSettingsVersion++; }
private void alternatingLinesEvenToolStripMenuItem_Click(object sender, EventArgs e) { if (rift) { rift = false; AttachRenderWindow(); } StereoMode = StereoModes.InterlineEven; Properties.Settings.Default.ColSettingsVersion++; }
private void oculusRiftToolStripMenuItem_Click(object sender, EventArgs e) { if (!riftInit) { if (InitRiftApi() != 1) { return; } riftInit = true; } GetRiftInfo(ref riftInfo); iod = (4 * ((riftInfo.HScreenSize / 4) - (riftInfo.LensSeparationDistance / 2)) / riftInfo.HScreenSize); double aspect = (double)riftInfo.HResolution / (2.0 * (double)riftInfo.VResolution); riftFov = aspect * 2 * Math.Atan(riftInfo.VScreenSize / (2 * riftInfo.EyeToScreenDistance)); if (riftInfo.VResolution == 800) //dev Kit { riftFov = 1.6446; } IntPtr ptr = GetDisplayName(); string name = Marshal.PtrToStringAnsi(ptr); FreeFloatRenderWindow(name); rift = true; StereoMode = StereoModes.OculusRift; Properties.Settings.Default.ColSettingsVersion++; }
private void anaglyphToolStripMenuItem_Click(object sender, EventArgs e) { if (rift) { rift = false; AttachRenderWindow(); } StereoMode = StereoModes.AnaglyphRedCyan; Properties.Settings.Default.ColSettingsVersion++; }
private void alternatingLinesEvenToolStripMenuItem_Click(object sender, EventArgs e) { StereoMode = StereoModes.InterlineEven; Properties.Settings.Default.ColSettingsVersion++; }
private void sideBySideCrossEyedToolStripMenuItem_Click(object sender, EventArgs e) { StereoMode = StereoModes.CrossEyed; Properties.Settings.Default.ColSettingsVersion++; }
private void StartRift() { try { if (!riftInit) { InitializeRift(); } rift = true; StereoMode = StereoModes.OculusRift; Properties.Settings.Default.ColSettingsVersion++; } catch { UiTools.ShowMessageBox("Unable to connect to Oculus Rift. Please make sure its not already in use or check setup using the Rift Configuration tool and try the test scene."); } }