{"action":"created","issue":{"url":"https://api.github.com/repos/OSVR/OSVR-Unity/issues/215","repository_url":"https://api.github.com/repos/OSVR/OSVR-Unity","labels_url":"https://api.github.com/repos/OSVR/OSVR-Unity/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/OSVR/OSVR-Unity/issues/215/comments","events_url":"https://api.github.com/repos/OSVR/OSVR-Unity/issues/215/events","html_url":"https://github.com/OSVR/OSVR-Unity/issues/215","id":218404099,"number":215,"title":"Better Linux and OSX Support","user":{"login":"demonixis","id":1017126,"avatar_url":"https://avatars1.githubusercontent.com/u/1017126?v=3","gravatar_id":"","url":"https://api.github.com/users/demonixis","html_url":"https://github.com/demonixis","followers_url":"https://api.github.com/users/demonixis/followers","following_url":"https://api.github.com/users/demonixis/following{/other_user}","gists_url":"https://api.github.com/users/demonixis/gists{/gist_id}","starred_url":"https://api.github.com/users/demonixis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demonixis/subscriptions","organizations_url":"https://api.github.com/users/demonixis/orgs","repos_url":"https://api.github.com/users/demonixis/repos","events_url":"https://api.github.com/users/demonixis/events{/privacy}","received_events_url":"https://api.github.com/users/demonixis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-31T05:48:09Z","updated_at":"2017-04-01T06:34:11Z","closed_at":null,"body":"Hi,\r\n\r\nFor now the Linux and OSX support is pretty bad but it can improved with two things\r\n1. Using the distortion correction shader provided in this project\r\n2. By moving the window in the HDK screen position\r\n\r\nI've implemented the OSVR SDK in my game engine and of course, RenderManager is not yet supported. BUT I was able to get distortion correction by [porting your post process](https://github.com/demonixis/C3DE/blob/develop/C3DE/VR/OSVR/OSVRService.cs#L196). Please use it when RenderManager is not available.\r\n\r\nFor the second point, we can open a new window on the location of the HMD [using this API](https://docs.unity3d.com/Manual/MultiDisplay.html).\r\n\r\nI can help to do that, what do you think about? Adding this will bring a better support of OSVR on Linux and it's required.\r\n\r\nEdit: You can find a working version of the post process [here](https://gist.github.com/demonixis/1476cb24171afe0a0187d5a9082797dd).\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1017126/24553138/6c6df18e-1629-11e7-98c6-92694911a283.png)\r\n"},"comment":{"url":"https://api.github.com/repos/OSVR/OSVR-Unity/issues/comments/290899969","html_url":"https://github.com/OSVR/OSVR-Unity/issues/215#issuecomment-290899969","issue_url":"https://api.github.com/repos/OSVR/OSVR-Unity/issues/215","id":290899969,"user":{"login":"demonixis","id":1017126,"avatar_url":"https://avatars1.githubusercontent.com/u/1017126?v=3","gravatar_id":"","url":"https://api.github.com/users/demonixis","html_url":"https://github.com/demonixis","followers_url":"https://api.github.com/users/demonixis/followers","following_url":"https://api.github.com/users/demonixis/following{/other_user}","gists_url":"https://api.github.com/users/demonixis/gists{/gist_id}","starred_url":"https://api.github.com/users/demonixis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demonixis/subscriptions","organizations_url":"https://api.github.com/users/demonixis/orgs","repos_url":"https://api.github.com/users/demonixis/repos","events_url":"https://api.github.com/users/demonixis/events{/privacy}","received_events_url":"https://api.github.com/users/demonixis/received_events","type":"User","site_admin":false},"created_at":"2017-04-01T06:34:11Z","updated_at":"2017-04-01T06:34:11Z","body":"Well the port of the current plugin to Linux and OSX requires OpenGL support and [it doesn't work for now](https://github.com/OSVR/OSVR-Unity-Rendering/tree/oglSupportOSX). I don't know why, maybe a difficulty on the Unity side.\r\n\r\nHowever, the `rendermanager` branch on the [Managed-OSVR](https://github.com/OSVR/Managed-OSVR/tree/rendermanager) looks promising. According to @JeroMiya It's not yet finished and only supports OpenGL. To work, it requires a pointer to the OpenGL or DirectX texture and Unity allows us to  [get that from C#](https://docs.unity3d.com/ScriptReference/Texture.GetNativeTexturePtr.html). So I think that a native plugin is not required if this branch can be finished/stabilized.\r\nHaving Managed-OSVR complete will allows other C# engine to enjoy OSVR.\r\n\r\nIn very short term, I think we can implement two feature to the current Unity SDK\r\n1. Distortion correction, it's easy, I have published the effect we need (see my previous screenshot) and you can use [that code](https://gist.github.com/demonixis/279327770795293a448cf0b0e531521a) to get the K1 parameters.\r\n2. Detect where is the OSVR HMD display (screen 2, 3 ?) and open a new window into that screen. Unity can [handle multi monitors](https://docs.unity3d.com/Manual/MultiDisplay.html), so we just have to push the dual camera view on that screen and keep a preview (the left eye by example) on the main screen.\r\n\r\n"}}
{"actor":{"display_login":"demonixis"}}