Engine Binary does not contain LibOVR shim files

In Engine/Source/ThirdParty/LibOVR/LibOVR_1_0_0/Src, the following files are missing:
OVR_CAPI_Util.cpp
OVR_CAPIShim.c
OVR_StereoProjection.cpp

These files are required for me to directly access LibOVR, otherwise my project fails to compile.

Hey trilorez,

I am not seeing these files every being included in the engine (back to 4.11). Can you explain where they originated from in order for you to require them?

Thanks.

I noticed that all of the Oculus related plugins (such as OculusRift and OculusInput) in the engine make use of those files to access LibOVR. I would like to be able to access LibOVR so I can determine the preferred audio device id for vr, since I am using my own audio engine.

Hey trilorez,

Can you point me to a chunk of code that the engine is using that relies on LibOVR?

Thanks.

Sure, here are some files that include LibOVR shim files:
https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Plugins/Runtime/OculusRift/Source/OculusRift/Private/OculusRiftCAPI.cpp
https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Plugins/Runtime/OculusInput/Source/Private/OculusInputCAPI.cpp

Hey trilorez,

Is your engine not compiling? I am still not sure what your issue is.

Please explain more about the relevancy of the LibOVR files with UE4 and your project.

Thanks.

I’m using the binary version of the engine, I believe there wouldn’t be an issue when compiling from source since the required files are present.

The issue is that I would like to directly access LibOVR in order to access functions that are not exposed by UE4’s OculusRift wrapper. When I include “OVR_CAPI_Audio.h” and use functions from it, I get linker errors stating that symbols are not defined. If I copy these files to the equivalent engine directory on my computer, the project succeeds in compiling.

So basically, it looks like when making release binaries of the engine, those shim files are not being included. This could be intentional, but it means that if I want direct access to LibOVR then I have to copy the shim files manually.

Hey trilorez,

If you would like to be able to include these files, I would highly recommend using the source build of the engine. You can start learning how to do that, here:

[][1]

Thank you for submitting a bug report, however at this time we believe that the issue you are describing is not actually a bug with the Unreal Engine, and so we are not able to take any further action on this. If you still believe this may be a bug, please provide steps for us to reproduce the issue, and we will continue our investigation.

[1]:

Just to clarify, are you saying that being able to access third party SDKs the engine uses is not supported? If so, I find that somewhat surprising since I think games should be able to take advantage of SDK features that aren’t exposed by the engine’s wrappers. I understand it’s easy to build from source or add the shim files directly to my project, but I’m still surprised at this not being supported by default.

Hi trilorez,

I apologize for not getting back to you sooner on this. To clarify, we do not include source files for third-party libraries in the binary version of the Engine. Not including these files does not affect the Engine’s default use of the LibOVR library, and our expectation is that anyone that needs to access parts of the library that are not included in our implementation is most likely working from a source-built Engine.