cancel
Showing results for 
Search instead for 
Did you mean: 

OculusRoomReallyTiny - cut down / simplified minimal sample

mattnewport
Protege
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 8

cybereality
Grand Champion
Thanks for sharing!

Anonymous
Not applicable
Would be awesome if there was an OpenGL 4 version.

Anonymous
Not applicable
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.

mattnewport
Protege
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.

mattnewport
Protege
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.

Pippopluto
Honored Guest
"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)

jobrandh
Honored Guest
This is super cool, thanks!

mattnewport
Protege
I've updated the OculusRoomReallyTiny sample to build with SDK 1.3.2 and tested on CV1.