Qt Widgets on OpenGL?



  • I know there is QOpenGLWidget that lets you embedd HW accelerated content like 3D models to your Qt Widget based application, but that means it must be rendered to framebuffer and than that framebuffer loaded into RAM and than used as normal image, right?

    This is perfmormance loss and so if you wan't really build something like 3D game engine with Qt, you must build your own framework on top of QWindow with GL surface - the same what Qt Widgets does but with Raster surface.

    I went trough source code of Qt Widgets and have feel that it is exactly what i need, but everything rendered via OpenGL. For example layouts classes works mostly with widgets sizeHint and few others primitive values, so just keep the same API like sizeHint() and you can use them as they are without reinventing wheel.

    I explored applications like Blender/Torque 3D/Godot/... to see how they solve same problem and they have their custom GUI frameworks, but this is probably because development started before Qt and other common frameworks was so powerfull.

    My idea is to start porting at least some code from Qt Widgets to OpenGL variant.

    Question: I would be glad if someone can give me some advice, for instance what could be problematic (or if it is even possible to move Qt Widgets to OpenGL).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.