diff options
| author | Yong He <yonghe@outlook.com> | 2021-01-11 09:11:52 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-11 09:11:52 -0800 |
| commit | 5554777188225266e2295db3588f6cb17cae0c4d (patch) | |
| tree | 9d15992cd24d752cde1047745cf75a25e841f494 /tools/graphics-app-framework/gui.h | |
| parent | e24c5a6cb9c3347477b83abe084a09ae8f9fde0a (diff) | |
Make `gfx::Renderer` a COM interface. (#1653)
* Make `gfx::Renderer` a COM interface.
This is a first step towards making the `gfx` library expose a COM compatible DLL interface. Remaining classes will come as separate PRs.
* Fixup project files
* Fix calling conventions
* Make gfx::create*Renderer() functions increase ref count by 1
* Make renderer createFunc return via out parameter
Diffstat (limited to 'tools/graphics-app-framework/gui.h')
| -rw-r--r-- | tools/graphics-app-framework/gui.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/graphics-app-framework/gui.h b/tools/graphics-app-framework/gui.h index d2c52de3c..fa6fda1d1 100644 --- a/tools/graphics-app-framework/gui.h +++ b/tools/graphics-app-framework/gui.h @@ -4,21 +4,21 @@ #include "tools/gfx/render.h" #include "vector-math.h" #include "window.h" - +#include "slang-com-ptr.h" #include "external/imgui/imgui.h" namespace gfx { struct GUI : RefObject { - GUI(Window* window, Renderer* renderer); + GUI(Window* window, IRenderer* renderer); ~GUI(); void beginFrame(); void endFrame(); private: - RefPtr<Renderer> renderer; + Slang::ComPtr<IRenderer> renderer; RefPtr<PipelineState> pipelineState; RefPtr<DescriptorSetLayout> descriptorSetLayout; RefPtr<PipelineLayout> pipelineLayout; |
