diff options
| author | Yong He <yonghe@outlook.com> | 2021-03-08 10:01:20 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-08 10:01:20 -0800 |
| commit | fc9968dc4fd58fab37476f48e4405c2743c5349c (patch) | |
| tree | 6119b293a5a5cc24401dde5ff54287beb28fe63b /tools/platform/gui.h | |
| parent | 95ca93938f5d45f4eaf340867965bd77a1724d6c (diff) | |
Refactor window library. (#1739)
* Refactor window library.
* Fix project file
* Fix warnings.
Diffstat (limited to 'tools/platform/gui.h')
| -rw-r--r-- | tools/platform/gui.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/platform/gui.h b/tools/platform/gui.h new file mode 100644 index 000000000..d22da3299 --- /dev/null +++ b/tools/platform/gui.h @@ -0,0 +1,34 @@ +// gui.h +#pragma once + +#include "slang-gfx.h" +#include "vector-math.h" +#include "window.h" +#include "slang-com-ptr.h" +#include "external/imgui/imgui.h" +#include "source/core/slang-basic.h" + +namespace platform { + +struct GUI : Slang::RefObject +{ + GUI(Window* window, + gfx::IRenderer* renderer, + gfx::ICommandQueue* queue, + gfx::IFramebufferLayout* framebufferLayout); + ~GUI(); + + void beginFrame(); + void endFrame(gfx::IFramebuffer* framebuffer); + +private: + Slang::ComPtr<gfx::IRenderer> renderer; + Slang::ComPtr<gfx::ICommandQueue> queue; + Slang::ComPtr<gfx::IRenderPassLayout> renderPass; + Slang::ComPtr<gfx::IPipelineState> pipelineState; + Slang::ComPtr<gfx::IDescriptorSetLayout> descriptorSetLayout; + Slang::ComPtr<gfx::IPipelineLayout> pipelineLayout; + Slang::ComPtr<gfx::ISamplerState> samplerState; +}; + +} // gfx |
