Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some methods throw an InvalidOperationException #41

Open
demonixis opened this issue Mar 13, 2017 · 4 comments
Open

Some methods throw an InvalidOperationException #41

demonixis opened this issue Mar 13, 2017 · 4 comments

Comments

@demonixis
Copy link

Some methods throw an InvalidOperationException, by example if you call RenderManager::GetRenderInfo, it happens, the message is osvrRenderManagerGetRenderInfoCollection call failed.

It's the same problem with GetViewerEyeSurfaceRadialDistortion or other methods of DisplayConfig. I checked the signature and it maches with the C API. So what is the problem?

@DuFF14
Copy link
Member

DuFF14 commented Apr 3, 2017

GetViewerEyeSurfaceRadialDistortion fails if radial distortion coefficients are not available in the display descriptor (probably means that HMD requires a more complex undistortion). Here is an example display descriptor which uses radial distortion: https://github.com/OSVR/OSVR-Core/blob/master/apps/displays/Sensics_zSight_1280_1024_1input.json#L29

Can you share the example code where osvrRenderManagerGetRenderInfoCollection fails? Make sure RM has been created and the display opened successfully before getting render info. Also check that the PInvoke signature is correct.

@demonixis
Copy link
Author

Sure, you can check my code here, It's a MonoGame application.

@DuFF14
Copy link
Member

DuFF14 commented Apr 4, 2017

Do those other calls before getrenderinfo succeed or fail? There isn't any error checking to see if RM was created and display opened successfully. For example: https://github.com/sensics/OSVR-RenderManager/blob/master/examples/RenderManagerOpenGLPresentExample.cpp#L213

Not sure of the status of OpenGL C++ API. You might want to try the C API which uses RenderInfoCollection instead of RenderInfo: https://github.com/sensics/OSVR-RenderManager/blob/master/examples/RenderManagerD3DCAPIExample.cpp#L218

@demonixis
Copy link
Author

The method GetRenderInfo can't be called ;) If I can call it, I have RenderManager support into my game engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants