PDA

View Full Version : Using Qt as a UI for DirectX or OpenGL



tryptic
22nd December 2009, 08:03
I'm interested in the possibility of using Qt to render the 2d UI for my 3d application. I'd prefer it to be decoupled such that it can use either OpenGL or DirectX (this app is exclusively for Windows).

Ultimately, what I'd like to be able to do is:
- create an exclusive fullscreen 3d window and some hidden QWidgets
- steer the user input through Qt so the hidden widgets are interactive
- render the hidden widgets to a QImage and upload that image to a dynamic texture to be composited with the gl/dx framebuffer

Is this even possible?

As it is, I have a small test project that renders a DirectX scene in a window, creates a hidden widget and render's that widget to a QImage, which I save to disk at intervals. However the child widgets don't appear to be positioned correctly in the saved images.
I'm also not sure about the event routing - ie. how to ensure the hidden widgets process input related messages.

Regards,

Kristian