summaryrefslogtreecommitdiff
path: root/tools/graphics-app-framework/gui.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-01-06 12:58:57 -0800
committerGitHub <noreply@github.com>2021-01-06 12:58:57 -0800
commit92636513abe72d2da0c45f0e2c1235415e0671c3 (patch)
tree234136e9d89006df9d6775e8bcd07e91ae344af7 /tools/graphics-app-framework/gui.h
parent706d4f91e269d473c963d31792fb2c8320933c9b (diff)
Refactor GUI/Window utils out of gfx library (#1649)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/graphics-app-framework/gui.h')
-rw-r--r--tools/graphics-app-framework/gui.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/graphics-app-framework/gui.h b/tools/graphics-app-framework/gui.h
new file mode 100644
index 000000000..d2c52de3c
--- /dev/null
+++ b/tools/graphics-app-framework/gui.h
@@ -0,0 +1,28 @@
+// gui.h
+#pragma once
+
+#include "tools/gfx/render.h"
+#include "vector-math.h"
+#include "window.h"
+
+#include "external/imgui/imgui.h"
+
+namespace gfx {
+
+struct GUI : RefObject
+{
+ GUI(Window* window, Renderer* renderer);
+ ~GUI();
+
+ void beginFrame();
+ void endFrame();
+
+private:
+ RefPtr<Renderer> renderer;
+ RefPtr<PipelineState> pipelineState;
+ RefPtr<DescriptorSetLayout> descriptorSetLayout;
+ RefPtr<PipelineLayout> pipelineLayout;
+ RefPtr<SamplerState> samplerState;
+};
+
+} // gfx