Although, a VR enabled UI view for the Win8 modern UI would be pretty compelling ..... hmmm....
That's a good point and it would be a great platform to get some simpler and less costly projects in to the "mainstream" long term .
We are mostly using Windows 7 here in the office, but I believe 8 should also work.
// Try to load function dynamically so that we don't require NT
// On Windows NT we will use InitializeCriticalSectionAndSpinCount
static bool initTried = 0;
static Function_InitializeCriticalSectionAndSpinCount pInitFn = 0;
HMODULE hmodule = ::LoadLibrary(OVR_STR("kernel32.dll"));
pInitFn = (Function_InitializeCriticalSectionAndSpinCount)
initTried = 1;
// Initialize the critical section
In Winrt you can't call LoadLibrary, InitializeCriticalSectionAndSpinCount or InitializeCriticalSection.
GetProcAddress still works (you need to get the library handle from LoadPackageLibrary, which won't load kernel32).
There's InitializeCriticalSectionEx (which has a spincount). But it's only available on Vista and above.
Then again, windows 8 metro apps can't run on older windows anyway, so if you build ovr for windows 8 metro then a define could replace all that code with InitializeCriticalSectionEx instead of trying to decide at runtime if the function is there.
It looks like you're new here. If you want to get involved, click one of these buttons!