Skip to main content
Up and Coming
October 6, 2015

OculusRoomReallyTiny - cut down / simplified minimal sample

Update:
I've now updated the sample to build with SDK 1.3.2. Get it from the newer repo here.
---

I find the OculusRoomTiny D3D11 sample is still a bit larger and more complex than it needs to be to make for a truly minimal sample. I spent some time trimming it down as a learning exercise and thought others might find it useful so I've put it up on GitHub.

This cut down version is a single file, < 800 lines and doesn't leak D3D objects the way the official sample does. I find it's useful to have something minimal like this to test with when trying to update a project to a newer SDK, hopefully it's useful to somebody else too.

Edit: for SDK 0.8 support and for future versions go here.

    8 replies

    Inspiring
    October 6, 2015
    Thanks for sharing!
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    October 8, 2015
    Would be awesome if there was an OpenGL 4 version.
    October 10, 2015
    I try compiling the code on Visual Studio Community 2015, and receive the following error. Windows 10.
    Oculus 0.7.0.0 SDK.

    Error LNK2019 unresolved external symbol __vswprintf_c_l referenced in function _swprintf OculusHello_0_7 C:\Users\basem\OneDrive\Oculus\Programming\OculusHello_0_7\OculusHello_0_7\LibOVR.lib(OVR_CAPIShim.obj) 1

    I've tried googling the error without success. Any ideas what i'm doing wrong.
    Up and Coming
    October 11, 2015
    That looks like a problem with the CRT options used to compile the Oculus SDK libs and the sample. I believe both my sample and the Oculus libs are set to use the non-DLL versions of the CRT by default (/MT for Release or /MTd for Debug for the static Runtime Library rather than /MD or /MDd for the DLL version). I'm not sure why you're running into that error but that's where I'd look first. I'll try building on a fresh system with a clean install of the SDK when I get a chance and see if I can figure out the issue. Honestly I've found the whole setup with how you're supposed to build and link LibOVR.lib is kinda confusing, especially when trying to build my app with VS2015, so maybe I've screwed something up in the setting somewhere.
    Up and Coming
    October 22, 2015
    I went to update this sample for SDK 0.8.0.0 and in the process realized it didn't really make much sense to have the SDK version embedded in the project and repo name on GitHub so I've moved it to a new OculusRoomReallyTiny repo.

    I also think the linker errors should be fixed now. Let me know if you have any trouble building the new version against SDK 0.8.0.0.
    New Participant
    February 1, 2016
    "Basementscientist" wrote:
    I try compiling the code on Visual Studio Community 2015, and receive the following error. Windows 10.
    Oculus 0.7.0.0 SDK.

    Error LNK2019 unresolved external symbol __vswprintf_c_l referenced in function _swprintf OculusHello_0_7 C:\Users\basem\OneDrive\Oculus\Programming\OculusHello_0_7\OculusHello_0_7\LibOVR.lib(OVR_CAPIShim.obj) 1

    I've tried googling the error without success. Any ideas what i'm doing wrong.


    Hi, I have the same error. Have you resolved it? If yes in wich way?
    The fact that I have compiled the 0.7 lib with VS13 and now I'm using VS15 could be the cause of the problem?

    EDIT Problem Solved. I have switch the runtime lib to /MTd (debug multithread) from /MD (dll multithread)
    New Participant
    February 3, 2016
    This is super cool, thanks!
    Up and Coming
    April 22, 2016
    I've updated the OculusRoomReallyTiny sample to build with SDK 1.3.2 and tested on CV1.