Giter Club home page Giter Club logo

qrhiimgui2's Introduction

New integration of Qt Quick and Dear ImGui. Requires Qt 6.4 or newer.

  • This now hides the Qt Quick threading model completely, and is a QQuickItem, meaning proper input event processing (keyboard focus, stacking order for mouse events, etc.).

  • The Qt Quick scenegraph integration happens via QSGRenderNode, which we now try to use in the most optimal way, while getting proper stacking with other items in the scene. (it won't implicitly disable the renderer's opaque pass as rendernodes traditionally would, but this is only available with Qt 6.5 and newer; whereas with older Qt 6 versions it all will still work, just slightly less optimally)

  • Unlike earlier attempts, the item size and the window device pixel ratio are respected as well. (NB following the item geometry and transform is still limited by design, e.g. scaling the item or rotating around any axis will lead to incorrect scissoring)

  • Applications can subclass QRhiImguiItem, reimplement frame() to do ImGui stuff (safely on the main thread, even if the Qt Quick rendering has its own render thread), register the item via the Qt 6 facilities (QML_NAMED_ELEMENT, qt_add_qml_module), then instantiate somewhere in the QML scene.

  • Input is migrated to the new API in 1.87+. (the key code mapping table may still be incomplete, though)

  • Additionally, plain QWindow applications or anything that renders with QRhi (e.g., from Qt 6.7 on, QRhiWidget and QQuickRhiItem) are supported too. See the simplewindow and imguiinrhiwidget examples.

Screenshot (screenshot of the customtextureingui example)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.