cancel
Showing results for 
Search instead for 
Did you mean: 

What LibOVR files are required for building stand-alone?

jwatte
Honored Guest
In a normal SDK, I would expect to be able to copy the "Include" and "Lib" files into some other app, set up access paths correctly for compiler/linker, and then be able to build a working application.

However, the very first thing in the SDK developer documentation is the #include <OVR_CAPI.h> which references files inside the "Src" directory.

Looking at the Visual Studio projects for building, there are a number of custom build rules to generate C headers from pixel shaders, that in turn depend on the DirectX SDK.

Unfortunately, the build system I want to integrate with uses Scons, and calls CL.EXE manually for CPP files. To build the entire SDK source as part of the application, I would have to duplicate the Visual Studio build rules into the Scons build system, which would be annoying.

Is there a set of instructions for how to use the LibOVR / Oculus 0.4.1 SDK from a stand-alone application? I can't find any documentation on this in the developer's guide; it seems to assume your application is part of the demo visual studio solution.
1 REPLY 1

jwatte
Honored Guest
For what it's worth, the current integration mechanism I'm using is:

0) Install DirectX SDK
1) Build the LibOVR project once using my version of Visual Studio. This generates the necessary compiled-shader header files.
2) Copy the Include and Src directories into my target application's external-libraries folder
3) Make scons file that builds all of the CPP files except CAPI_D3D1X_DistortionRenderer.cpp and Src/CAPI/D3D1X/CAPI_D3D1X_Util.cpp into a DLL
4) Make my referencing library add both LibOVR/Src and LibOVR/Include to the compiler include search path
5) #define OVR_D3D_VERSION=1 on the command line for the compiler.

Steps 2 and 3 are expected; steps 0, 1, 4, and 5, are not what I'd expect to have to reverse engineer and then do to be able to use an SDK/library. Installing an SDK /should/ be:
1) copy supplied link libraries and DLL files into appropriate library directories
2) copy the Includes directory into appropriate include directory
3) set appropriate compiler include paths

(This also assumes that the library uses a compatible linkable interface in the supplied DLL.)