Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
draxov's avatar
draxov
Honored Guest
11 years ago

OculusPlugin.dll Source Code for Unity Integration 0.4.1

I was wondering if there was any way we could look at the source code for Unity Integration of the OculusPlugin.dll? I'm currently trying to work out how the Oculus renders in Unity's pipeline and I am finding it hard, despite the best efforts of the devs on this forum.

3 Replies

Replies have been turned off for this discussion
  • So far the PC/Mac plugin source has not been released, but it may be in the future. All it does now is maintain the gamepad, export CAPI functions, and make the standard render-thread calls to ovrHmd_BeginFrame(..), ovrHmd_EndFrame(..), and ovrHmd_GetTrackingState(..) for distortion rendering. We do some tricky things to get the D3D11 constructs we need for that and to make ovrHmd_EndFrame's buffer swap supersede the usual one, but they shouldn't affect app behavior. The main things to be aware of are (1) all distortion rendering calls are made from the render thread, (2) we compute a frame's rendering pose immediately after the previous frame's ovrHmd_EndFrame() call to minimize scheduling variability, and (3) we call ovrHmd_EndFrame at almost exactly the same point where the buffer swap would normally occur, which should be after all rendering, image effects, and GUI drawing are done. We also detect the editor's Game view by comparing its resolution to Screen.width and Screen.height, which can lead to problems if they are almost the same. Hope that helps.
  • Hi,

    Would it be possible to release the source code nowish? We have investors coming to look at our project in a few days, and we are completely blocked because we cannot modify the API and compile a .dll for Unity.

    This is urgent for us. If there is a price-tag associated with this access, we will pay it.

    It seems rather convoluted to use a third party solution, or create our own, just to make updates to the API ;)

    Marvin Friedrich
    marvinfriedrich@gmail.com

    Lead Engineer
    The Void
    thevoid.com
  • So it doesn't appear the source code is public at the moment.

    It's still a possibility in the future, but I would not set plans or deadlines based on this happening.