From 73ff6907d723003d30e400f661876e7960de574f Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Mon, 6 Aug 2018 15:52:38 -0700 Subject: Add basic support for "Dear IMGUI" (#625) This isn't being made visible just yet, but it will allow us to have a simple UI for loading models into the model-viewer example. In order to support rendering with IMGUI I had to add the following to the `Renderer` layer: * viewports * scissor rects * blend support These are really only fully implemented for D3D11, but adding them to the other back-ends should be a reasonably small task. --- tools/gfx/gui.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tools/gfx/gui.h (limited to 'tools/gfx/gui.h') diff --git a/tools/gfx/gui.h b/tools/gfx/gui.h new file mode 100644 index 000000000..cbec5796f --- /dev/null +++ b/tools/gfx/gui.h @@ -0,0 +1,28 @@ +// gui.h +#pragma once + +#include "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; + RefPtr pipelineState; + RefPtr descriptorSetLayout; + RefPtr pipelineLayout; + RefPtr samplerState; +}; + +} // gfx -- cgit v1.2.3