La première chose à faire est d'installer tous les outils nécessaires au fonctionnement du casque sur votre PC.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Vector3[] GetDistortionParams() | |
{ | |
var displayConfig = _context.GetDisplayConfig(); | |
var numViewers = displayConfig.GetNumViewers(); | |
var distortionParams = new Vector3[2]; | |
if (numViewers != 1) | |
return -1; | |
for (uint viewer = 0; viewer < numViewers; viewer++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace OSVR.Unity | |
{ | |
[ExecuteInEditMode] | |
[RequireComponent(typeof(Camera))] | |
public sealed class OsvrDistortion : MonoBehaviour | |
{ | |
private bool isSupported = true; | |
private Material distortionMaterial = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class VideoManager : MonoBehaviour | |
{ | |
[SerializeField] | |
private RenderTexture _renderTexture = null; | |
[SerializeField] | |
private VideoClip _videoClip = null; | |
private IEnumerator Start() | |
{ | |
Application.runInBackground = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using InControl; | |
using UnityEngine; | |
namespace Demonixis.Toolbox | |
{ | |
public class OculusTouchVirtualDevice : InputDevice | |
{ | |
private Vector2 _leftTouch = Vector2.zero; | |
private Vector2 _rightTouch = Vector2.zero; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <PVR_API.h> | |
#include <iostream> | |
int main(int argc, char** argv) | |
{ | |
pvrResult result = pvr_initialise(); | |
if (result == pvr_success) | |
{ | |
std::cout << "PVR SDK Initialized!" << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "This configuration supports video (so-called 'positional') and IMU fusion tracking, in addition to orientation-only tracking, with the OSVR HDK. It is configured for RenderManager applications in direct mode (portrait) on HDK 1.3 optics.", | |
"display": "displays/OSVR_HDK_1_3.json", | |
"renderManagerConfig": "sample-configs/renderManager.direct.landscape.json", | |
"drivers": [{ | |
"plugin": "com_osvr_VideoBasedHMDTracker", | |
"driver": "VideoBasedHMDTracker", | |
"params": { | |
"showDebug": false, | |
"includeRearPanel": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "This configuration supports video (so-called 'positional') and IMU fusion tracking, in addition to orientation-only tracking, with the OSVR HDK. It is configured for RenderManager applications in direct mode (portrait) on HDK 1.3 optics.", | |
"display": "displays/OSVR_HDK_1_3.json", | |
"renderManagerConfig": "sample-configs/renderManager.direct.landscape.json", | |
"drivers": [{ | |
"plugin": "com_osvr_VideoBasedHMDTracker", | |
"driver": "VideoBasedHMDTracker", | |
"params": { | |
"showDebug": false, | |
"includeRearPanel": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getGraphicsCardName() { | |
var canvas = document.createElement("canvas"); | |
var gl = canvas.getContext("experimental-webgl") || canvas.getContext("webgl"); | |
if (!gl) { | |
return "Unknow"; | |
} | |
var ext = gl.getExtension("WEBGL_debug_renderer_info"); | |
if (!ext) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static bool HasOSVRHMDEnabled() | |
{ | |
#if UNITY_STANDALONE | |
var clientContext = new OSVR.ClientKit.ClientContext(GamePrefs.AppID); | |
// Check if the server is running | |
if (clientContext != null && clientContext.CheckStatus()) | |
{ | |
// Check if the HMD si connected | |
var displayConfig = clientContext.GetDisplayConfig(); |