diff options
| author | s-ol <s+removethis@s-ol.nu> | 2021-03-27 08:58:07 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2021-03-27 08:59:23 +0000 |
| commit | 949df6bdb9d838934b0f14316bb6fc715962200d (patch) | |
| tree | 303f6301b8aa1482acf416641746caf8a380ba33 /Primitives/interface | |
| parent | Enable VulkanLogicalDevice with external devices (diff) | |
| download | DiligentCore-949df6bdb9d838934b0f14316bb6fc715962200d.tar.gz DiligentCore-949df6bdb9d838934b0f14316bb6fc715962200d.zip | |
DILIGENT_BEGIN_INTERFACE1 helper
Diffstat (limited to 'Primitives/interface')
| -rw-r--r-- | Primitives/interface/CommonDefinitions.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Primitives/interface/CommonDefinitions.h b/Primitives/interface/CommonDefinitions.h index 483ae86f..8a290076 100644 --- a/Primitives/interface/CommonDefinitions.h +++ b/Primitives/interface/CommonDefinitions.h @@ -69,6 +69,13 @@ } Iface; \ struct Iface##Methods +# define DILIGENT_BEGIN_INTERFACE1(Iface) \ + typedef struct Iface \ + { \ + struct Iface##Vtbl* pVtbl; \ + } Iface; \ + struct Iface##Methods + # define DEFAULT_VALUE(x) # define CALL_IFACE_METHOD(Iface, Method, This, ...) (This)->pVtbl->Iface.Method((I##Iface*)(This), ##__VA_ARGS__) @@ -96,6 +103,8 @@ # define DILIGENT_BEGIN_INTERFACE(Name, Base) struct Name : public Base +# define DILIGENT_BEGIN_INTERFACE1(Name) struct Name + # define DEFAULT_VALUE(x) = x #endif |
