Closed Thantalos closed 6 years ago
I guess this is SDK v0.5.0.1 you are using?
My guess would be some resource which is not destructed correctly inside the library.
No, this is with v0.6.0.1.0 I would also assume, that there is something missing in the destructor, or destructed in the wrong order.
Well, the v0.6 branch of the osgoculusviewer is still unstable. So I would expect these types of problems. But if you are able to track down the problem we could hopefully fix it.
I have fixed some of these problems in: 6885e52ba13bddb8e3eff18a4a0673e3d2acd41a
But there is still the open issue with the destruction of the mirrorFBO. To handle this we need to be able to detect when the graphic context is about to close and run the destruction of the MirrorTexture.
@Thantalos I just tried your example with v1.5 of the Oculus runtime. And it do not crash anymore, so Oculus must have plugged this bug. But I am not entirely happy with not closing the resources correctly when destroying the mirror texture.
I have submitted a pull request to the OpenSceneGraph project which includes a cleanUp operator for the graphic contexts (openscenegraph/OpenSceneGraph@ed7d49c5d2169dc422dad37bdbe334250fc7362e). This will probably be included in the upcoming OSG v3.6 release. And as soon as that has been released I will updated the code to support that functionality.
Just tested the viewer in my setup. Works really well, thank you. Just one bug I came across: When the viewer is closed, it can't be restarted. I will look into it myself too.
Here just a simple modification of the viewerexample.cpp, demonstrating the issue: