Coder Social home page Coder Social logo

Better Linux and OSX Support about osvr-unity HOT 4 OPEN

demonixis avatar demonixis commented on July 29, 2024
Better Linux and OSX Support

from osvr-unity.

Comments (4)

russell-taylor avatar russell-taylor commented on July 29, 2024

Cool, thanks! Is there a barrier other than the time it would take to porting the RenderManager Unity plug-in to Linux or OSX?

from osvr-unity.

demonixis avatar demonixis commented on July 29, 2024

Well the port of the current plugin to Linux and OSX requires OpenGL support and it doesn't work for now. I don't know why, maybe a difficulty on the Unity side.

However, the rendermanager branch on the Managed-OSVR 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#. So I think that a native plugin is not required if this branch can be finished/stabilized.
Having Managed-OSVR complete will allows other C# engine to enjoy OSVR.

In very short term, I think we can implement two feature to the current Unity SDK

  1. Distortion correction, it's easy, I have published the effect we need (see my previous screenshot) and you can use that code to get the K1 parameters.
  2. Detect where is the OSVR HMD display (screen 2, 3 ?) and open a new window into that screen. Unity can handle multi monitors, 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.

Edit: I have updated my fork and added the distortion correction if RenderManager is not available. I have to test it first.

from osvr-unity.

DuFF14 avatar DuFF14 commented on July 29, 2024

OpenGL support is working on Windows in extended mode. Direct mode won't work on OSX or Linux anyway, right? For OSX and Linux support, the platform-specific context sharing code needs to be ported. Specifically, this call to wglShareLists is only available on Windows:
https://github.com/OSVR/OSVR-Unity-Rendering/blob/oglSupport/OsvrRenderingPlugin.cpp#L283

This splits to another branch for OSX support, and I just pushed my most recent commits which haven't been tested.
https://github.com/OSVR/OSVR-Unity-Rendering/compare/oglSupportOSX

@demonixis I will take a look at the PR

from osvr-unity.

demonixis avatar demonixis commented on July 29, 2024

Hi,

Yes the plugin works well on Windows (Direct mode is good and as you said, OpenGL works in extended mode), you've made a nice work on it. But as I said, i've implemented the OSVR SDK into my own engine so I learnt a lot about OSVR recently.
I believe if we use a complete binding of OSVR (Core + RenderManager) we can bring some RM features to Linux and Mac too in extended mode. That's what gamers on those OSs want.
My pull request that adds Distortion correction is clearly not perfect, it's a temporary fix for a majority of uers on Linux and Mac which use an OSVR HDK.

I don't know but some methods fails to call from native code, you can see that in my last PR too. I've also opened an issus on the Managed-OSVR repository OSVR/Managed-OSVR#41 and talked a bit about that with @JeroMiya .

Some parts of MonoGame-OSVR could be merged into Managed-OSVR (json descriptor parsing by example), because with a finished binding of RenderManager, we can avoid the native plugin and have a better support for other OSs.

Why do I have opened this issue? Because I'm a game developer for my own and for a company and in both cases, we use OSVR. It's impossible to sell a game or an application on Linux and Mac because it doesn't work as expected. And what do we want on those OSs?

  • Distortion correction
  • Automatic Window placement
  • Timewarp

All these features are supported on Linux and Mac with any GPU. So yes it's just a binding to finish.

from osvr-unity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.