Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Metal-accelerated QPainter on macOS with MoltenGL?

    General and Desktop
    2
    2
    672
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Adam T last edited by

      The QPainter calls used for 2D drawing can be run on QOpenGLPaintDevice ( http://doc.qt.io/qt-5/qopenglpaintdevice.html ) as shown in http://doc.qt.io/qt-5/qtgui-openglwindow-example.html

      I can construct a QOpenGLWidget ( http://doc.qt.io/qt-5/qopenglwidget.html ) and then possibly set the format to OpenGL ES 2.0.

      The commercial MoltenGL library ( https://moltengl.com/moltengl/ ) provides a live translation of OpenGL ES 2.0 into the Apple Metal API on macOS and iOS.

      So — would it be possible to use the QPainter engine with QOpenGLWidget in such a way that Qt actually “draws to MoltenGL” on macOS and then MoltenGL uses Metal to accelerate the drawing?

      Since Apple is deprecating OpenGL and there is currently no Vulkan-based QPainter engine (where then MoltenVK could be used) — I think Qt widgets with QOpenGLWidget that uses OpenGL ES 2.0 and with MoltenGL could provide a sensible way forward for hardware-accelerared Qt widget rendering on the Apple platforms.

      But is this easily possible?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        That's something you should rather bring to the interest mailing list. You'll find the Qt's developers/maintainers. This forum is more user oriented.

        Note that there's experimental support for MoltenVK on macOS planned for 5.12. You should be able to play with it using the dev branch.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 2
        • First post
          Last post