sensics / OSVR-RenderManager

Apache License 2.0
63 stars 45 forks source link

SDL doesn't get events when using OpenGL/D3D #17

Open russell-taylor opened 8 years ago

russell-taylor commented 8 years ago

When we host an OpenGL render manager on top of a D3D one, the SDL events for the window being displayed don't get sent to the handler function in D3D.

If we use just the D3D renderer, they do.

Probably has to do with the hidden window that OpenGL opens to initialize GLEW.

Neither of the windows get these events when we open two of them in D3D mode (num_displays = 2).

russell-taylor commented 7 years ago

Note the thread that constructed the window is the only one that can call SDL_PollEvent() and get events for that window.

russell-taylor commented 7 years ago

Looks like we'll need to switch to GLFW from SDL2 as our window constructor to fix this and other issues related to handling multi-threaded rendering and multi-window rendering.