c++ - How do I use Qt and SDL together? -
i building physics simulation engine , editor in windows. want build editor part using qt , want run engine using sdl opengl.
my first idea build editor using qt , share code engine (the resource manager, renderer, maths). but, able run simulation inside editor. this means have share simulation code uses sdl threads.
so, question this: there way have render opengl qt window using sdl?
i have read on web might possible supply sdl window handle in render. has experience dong that?
also, threaded part of simulator might pose problem since uses sdl threads.
while might work first answer suggest run problems due threading. there no simple solutions when comes threading, , here have sdl qt , opengl mainloop interacting. not fun.
the easiest , sanest solution decouple both parts. sdl , qt run in separate processes , have them use kind of messaging communicate (i'd recommend d-bus here ). can have sdl render borderless window , editor sends commands via messages.
Comments
Post a Comment