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/model.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/model.h')
| -rw-r--r-- | tools/graphics-app-framework/model.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/graphics-app-framework/model.h b/tools/graphics-app-framework/model.h index e86940244..446f57943 100644 --- a/tools/graphics-app-framework/model.h +++ b/tools/graphics-app-framework/model.h @@ -3,7 +3,7 @@ #include "tools/gfx/render.h" #include "vector-math.h" - +#include "slang-com-ptr.h" #include <vector> #include <string> @@ -65,10 +65,10 @@ struct ModelLoader FlipWinding = 1 << 0, }; - ICallbacks* callbacks = nullptr; - RefPtr<Renderer> renderer; - LoadFlags loadFlags = 0; - float scale = 1.0f; + ICallbacks* callbacks = nullptr; + Slang::ComPtr<IRenderer> renderer; + LoadFlags loadFlags = 0; + float scale = 1.0f; Result load(char const* inputPath, void** outModel); }; |
