diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-26 03:06:12 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-26 03:06:12 +0000 |
| commit | 7cc1c475e5822da8bad790b66d3ddbd5f8afddd5 (patch) | |
| tree | b51ebaaa670242532134bf4958d2dc8b5ec1ea03 /Primitives/interface | |
| parent | Fixed few C issues in platform definitions (diff) | |
| download | DiligentCore-7cc1c475e5822da8bad790b66d3ddbd5f8afddd5.tar.gz DiligentCore-7cc1c475e5822da8bad790b66d3ddbd5f8afddd5.zip | |
Fixed Buffer, BufferView, Texture, TextureView interfaces; added C interface tests
Diffstat (limited to 'Primitives/interface')
| -rw-r--r-- | Primitives/interface/Object.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Primitives/interface/Object.h b/Primitives/interface/Object.h index 3635c154..a3ede3ff 100644 --- a/Primitives/interface/Object.h +++ b/Primitives/interface/Object.h @@ -86,7 +86,7 @@ struct IObject; // clang-format off -struct IObjectVtbl +struct IObjectMethods { void (*QueryInterface) (struct IObject*, const struct INTERFACE_ID* IID, struct IObject** ppInterface); ReferenceCounterValueType (*AddRef) (struct IObject*); @@ -94,18 +94,23 @@ struct IObjectVtbl class IReferenceCounters* (*GetReferenceCounters)(struct IObject*); }; +struct IObjectVtbl +{ + struct IObjectMethods Object; +}; + // clang-format on struct IObject { - struct IObjectVtbl* pObjectVtbl; + struct IObjectVtbl* pVtbl; }; // clang-format off -# define IObject_QueryInterface(This, ...) (This)->pObjectVtbl->QueryInterface((struct IObject*)(This), __VA_ARGS__) -# define IObject_AddRef(This, ...) (This)->pObjectVtbl->AddRef ((struct IObject*)(This), __VA_ARGS__) -# define IObject_Release(This) (This)->pObjectVtbl->Release ((struct IObject*)(This)) +# define IObject_QueryInterface(This, ...) (This)->pVtbl->Object.QueryInterface((struct IObject*)(This), __VA_ARGS__) +# define IObject_AddRef(This, ...) (This)->pVtbl->Object.AddRef ((struct IObject*)(This), __VA_ARGS__) +# define IObject_Release(This) (This)->pVtbl->Object.Release ((struct IObject*)(This)) // clang-format on |
