OSVR / OSVR-Unity

Package for authoring OSVR experiences with Unity.
Apache License 2.0
98 stars 38 forks source link

Incorrect/non-matching calling convention for rendering plugin? #160

Closed rpavlik closed 8 years ago

rpavlik commented 8 years ago

From what I gathered when reviewing and refactoring the unity rendering plugin, all the exported functions have always been stdcall, but there was some messing around using a .DEF file in addition to declspec(dllexport), and I see some of the functions are being p/invoked as if they don't have a return value when they actually do... This section could probably really use a sizeable review.

https://github.com/OSVR/OSVR-Unity/blob/master/OSVR-Unity/Assets/OSVRUnity/src/OsvrRenderManager.cs

see also my pull request on the render plugin itself: https://github.com/OSVR/OSVR-Unity-Rendering/pull/19 in particular, now all exported functions have their prototypes in one header: https://github.com/OSVR/OSVR-Unity-Rendering/blob/ryan-cleanup/OsvrRenderingPlugin.h

cc @JeroMiya

JeroMiya commented 8 years ago

Implemented in https://github.com/OSVR/OSVR-Unity/issues/168