Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ScottieBizzle's avatar
12 years ago

Swapchain presenting to window, yet no blue light

My display mode is set to "Direct HMD Access from Apps" and the OculusRoomTiny sample works fine. It initializes, then on the 3rd or so call to ProcessAndRender ( specifically the RParams.pSwapChain->Present(swapInterval, 0) call ) the device kicks in, the blue light goes on and whatever is on the swap chain is shown on the HMD.

Now in my own app, I've got everything set up almost the same, everything is rendering fine, and the final image is warped to my swap chain and displayed in my window, but the device never kicks in, light stays yellow and nothing is sent to the HMD.

So in the tiny sample, what exactly prompts the device to know the swap chain is setup for the HMD? I was assuming it was the ovrHmd_AttachToWindow(HMD, window, NULL, NULL), call and the fact the swap chain is also set to that window.

Here's my window creation code...

WNDCLASS wc;
memset(&wc, 0, sizeof(wc));
wc.lpszClassName = "OVRAppWindow";
wc.style = CS_OWNDC;
wc.lpfnWndProc = ::DefWindowProc;
wc.cbWndExtra = NULL;
RegisterClass( &wc );

HWND HWindow = CreateWindow( "OVRAppWindow", "OculusRoomTiny", WS_POPUP | WS_VISIBLE | WS_OVERLAPPEDWINDOW, 0, 0, m_OculusHMD->Resolution.w, m_OculusHMD->Resolution.h, NULL, NULL, ::AfxGetApp()->m_hInstance, NULL );
m_Oculus_Window.Attach( HWindow );

ovrHmd_AttachToWindow( m_OculusHMD, HWindow, NULL, NULL );

I'm also calling the ovrHmd_BeginFrame(HMD, 0) and ovrHmd_EndFrame(HMD, eyeRenderPose, &EyeTexture[0].Texture) and the image is being presented to my window fine.

Any idea what I'm missing here?

Thanks

17 Replies