Comments (11)
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.
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.
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.
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.
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.
@russell-taylor Any update on this?
from osvr-rendermanager.
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.
@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.
@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.
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.
@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)
- RM always displays an "error" on startup that says "ignore previous errors"
- ATW not operating as expected with example programs on DK2/GeForce 1080 HOT 10
- AMD sub-module no longer uses NDA s.d.k? HOT 2
- ATW: "bubbles" of missed vsyncs in D3D11 ATW implementation HOT 1
- expose an interface for detecting HDMI will be better... HOT 3
- distortion mesh with multiple video inputs HOT 10
- D3D11 backend appears to hard-depend on SDL in code, but not in build system HOT 1
- OSVR-Unity Android crash traces to RenderManagerOpenGL::checkShaderError HOT 2
- Direct Mode w/ DK1 results in [NVAPI_RESOURCE_NOT_ACQUIRED] after 12 seconds of rendering HOT 3
- Overfill factor and distortion correction HOT 2
- Check the distortion correction texture lookups HOT 1
- Why have the OpenGL rendering examples stopped working? HOT 4
- Why is there a band of black at the top of the display?
- Direct mode doesn't work with mobile Nvidia GPUs HOT 8
- cmake policy warning FindOpenGL
- When there is only one eye, don't offset it
- OpenGL state is not restored when using a single eye
- Rendering broken on a mac HOT 1
- Shared-context apps fail to get an OpenGL context when run on a mac HOT 2
- Add synchronization primitive to indicate to the app when buffer is complete
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osvr-rendermanager.