aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/qtimgui/README.md
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-10-21 09:29:06 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-10-24 19:00:58 +0200
commit40722c098d11d01dec727d1c1cbf507e54de7255 (patch)
treee25d3f82b6d91d9b34ffbb946d7b86fadecd6825 /3rdparty/qtimgui/README.md
parentb948b76c8ea5ec57b6a424baa1b117c0025c0328 (diff)
downloadnextpnr-40722c098d11d01dec727d1c1cbf507e54de7255.tar.gz
nextpnr-40722c098d11d01dec727d1c1cbf507e54de7255.tar.bz2
nextpnr-40722c098d11d01dec727d1c1cbf507e54de7255.zip
add qtimgui renderer library
Diffstat (limited to '3rdparty/qtimgui/README.md')
-rw-r--r--3rdparty/qtimgui/README.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/3rdparty/qtimgui/README.md b/3rdparty/qtimgui/README.md
new file mode 100644
index 00000000..16a46f55
--- /dev/null
+++ b/3rdparty/qtimgui/README.md
@@ -0,0 +1,38 @@
+# QtImGui
+
+Qt (QOpenGLWidget / QOpenGLWindow) backend for [ImGui](https://github.com/ocornut/imgui)
+
+It enables ImGui to run in QOpenGLWidget / QOpenGLWindow.
+
+[![https://gyazo.com/eb68699c96b9147cca3d5ea9fadfc263](https://i.gyazo.com/eb68699c96b9147cca3d5ea9fadfc263.gif)](https://gyazo.com/eb68699c96b9147cca3d5ea9fadfc263)
+
+## How to use
+
+* Add QtImGui sources and headers to your project
+ * If you are using git submodule, run `git submodule update --init --recursive` to ensure that the inner submodule is initialized as well.
+* Add `include(path/to/qtimgui.pri)` to youre `.pro` file
+* Subclass `QOpenGLWindow` or `QOpenGLWidget` and:
+
+```cpp
+class DemoWindow : public QOpenGLWindow
+{
+protected:
+ void initializeGL() override
+ {
+ QtImGui::initialize(this);
+ }
+ void paintGL() override
+ {
+ // you can do custom GL rendering as well in paintGL
+
+ QtImGui::newFrame();
+
+ ImGui::Text("Hello");
+ // more widgets...
+
+ ImGui::Render();
+ }
+};
+```
+
+See [QOpenGLWidget example](demo-widget/demo-widget.cpp) and [QOpenGLWindow example](/demo-window/demo-window.cpp) for details.