GithubHelp home page GithubHelp logo

Comments (11)

russell-taylor avatar russell-taylor commented on August 16, 2024

Right now, RenderManager always creates the OpenGL context. That won't work with Unity and Unreal integration, so we're in the middle of figuring out how to handle this. It has always been in the design to enable context sharing but has not yet been implemented. With D3D, shared contexts are available. With OpenGL, there are OS- and library-specific ways to get the context, so we're looking at maybe just asking RenderManager to keep the original context and not create a new one.

We hope to have something on this in the next few weeks.

Ideas appreciated, especially just now before we do the implementation.

from osvr-rendermanager.

CrossVR avatar CrossVR commented on August 16, 2024

I don't have any other suggestions, I'm not that familiar with context sharing. For now I'll try to see if I can disable our OpenGL context.

from osvr-rendermanager.

CrossVR avatar CrossVR commented on August 16, 2024

Looks like we heavily depend on our own OpenGL context handling, so I can't easily disable it. Hopefully OSVR can finish this soon, the RenderManager is definitely the way forward for OSVR.

from osvr-rendermanager.

sradigan avatar sradigan commented on August 16, 2024

It looks like VTK does something similar with InitializeFromCurrentContext as I just found while researching how to make VTK use the RenderManager's context.

Diff of the commit that introduced it:
http://www.vtk.org/gitweb?p=VTK.git;a=commitdiff;h=2eb0792e;hp=4b7b1394d222a71090f1c0c7b3042f06587338e0

Official documentation:
http://www.vtk.org/doc/nightly/html/classvtkRenderWindow.html#a6e14295f59ec142fc1023e525e79bb86

A simple example utilizing it:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT

Edit: Added example

from osvr-rendermanager.

russell-taylor avatar russell-taylor commented on August 16, 2024

Thanks for the pointers! This is on my ToDo list for early next week, unless you beat me to it with a pull request...

from osvr-rendermanager.

CrossVR avatar CrossVR commented on August 16, 2024

@russell-taylor Any update on this?

from osvr-rendermanager.

russell-taylor avatar russell-taylor commented on August 16, 2024

Actually... this got pushed down on the stack by looking at performance issues and than I ran out of hours on this project. I'm currently playing catch-up on hours and this has gotten pushed down on the stack a bit, so I think you'll win the race... I'll leave this in my email inbox and hope to squeeze it in early next week. Sorry about the slow response.

from osvr-rendermanager.

CrossVR avatar CrossVR commented on August 16, 2024

@russell-taylor Unfortunately I have a lot of other projects I need to work on, so I don't have time to make any significant contributions to the OSVR RenderManager. I will continue to work on integrating OSVR once this issue is resolved.

from osvr-rendermanager.

russell-taylor avatar russell-taylor commented on August 16, 2024

@Armada651 Okay, I've got a branch and a pull request that has an example program that creates its own OpenGL context and asks RenderManager to share it. The branch is at https://github.com/sensics/OSVR-RenderManager/tree/opengl-sharing that hopefully will work with Unity's OpenGL path.  There is an example program showing how to ask for this.  You need to create a library like at https://github.com/sensics/OSVR-RenderManager/blob/opengl-sharing/examples/RenderManagerOpenGLShared... and then pass that library into the createRenderManager() call. Let me know if you get the chance to test this and I'll close my internal issue if it works.

from osvr-rendermanager.

russell-taylor avatar russell-taylor commented on August 16, 2024

This has now been pulled into the master branch. I'm going to go ahead and close the issue. You can re-open if it is not working when you try it.

from osvr-rendermanager.

CrossVR avatar CrossVR commented on August 16, 2024

@russell-taylor Sorry, haven't been able to test this yet, I will try it out as soon as I have time to work on the Dolphin Emulator again.

from osvr-rendermanager.

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.