I am building a physics simulation engine and editor in Windows. I want to build the editor part using Qt and I want to run the engine using SDL with OpenGL.
My first idea was to build the editor using only Qt and share as much code with the engine (the resource manager, the renderer, the maths). But, I would also like to be able to run the simulation inside the editor. This means I also have to share the simulation code which uses SDL threads.
So, my question is this: Is there a way to have an the render OpenGL to a Qt window by using SDL?
I have read on the web that it might be possible to supply SDL with a window handle in which to render. Anybody has experience dong that?
Also, the threaded part of the simulator might pose a problem since it uses SDL threads.
See Question&Answers more detail:os