git.s-ol.nu forks/DiligentCore / 3d92951
Reworked C interface to optimize inheritance handling assiduous 3 years ago
82 changed file(s) with 385 addition(s) and 662 deletion(s). Raw diff Collapse all Expand all
175175 #define DILIGENT_INTERFACE_NAME IBuffer
176176 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
177177
178 #define IBufferInclusiveMethods \
179 IDeviceObjectInclusiveMethods; \
180 IBufferMethods Buffer
178181
179182 /// Buffer interface
180183
240243
241244 #if DILIGENT_C_INTERFACE
242245
243 // clang-format on
244
245 struct IBufferVtbl
246 {
247 struct IObjectMethods Object;
248 struct IDeviceObjectMethods DeviceObject;
249 struct IBufferMethods Buffer;
250 };
251
252246 // clang-format off
253247
254248 # define IBuffer_GetDesc(This) (const struct BufferDesc*)IDeviceObject_GetDesc(This)
141141 #define DILIGENT_INTERFACE_NAME IBufferView
142142 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
143143
144 #define IBufferViewInclusiveMethods \
145 IDeviceObjectInclusiveMethods; \
146 IBufferViewMethods BufferView
147
144148 /// Buffer view interface
145149
146150 /// To create a buffer view, call IBuffer::CreateView().
166170
167171 #if DILIGENT_C_INTERFACE
168172
169 // clang-format on
170
171 struct IBufferViewVtbl
172 {
173 struct IObjectMethods Object;
174 struct IDeviceObjectMethods DeviceObject;
175 struct IBufferViewMethods BufferView;
176 };
177
178173 // clang-format off
179174
180175 # define IBufferView_GetDesc(This) (const struct BufferViewDesc*)IDeviceObject_GetDesc(This)
611611 #define DILIGENT_INTERFACE_NAME IDeviceContext
612612 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
613613
614 #define IDeviceContextInclusiveMethods \
615 IObjectInclusiveMethods; \
616 IDeviceContextMethods DeviceContext
617
614618 /// Device context interface.
615619
616620 /// \remarks Device context keeps strong references to all objects currently bound to
13171321 #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
13181322
13191323 #if DILIGENT_C_INTERFACE
1320
1321 // clang-format on
1322
1323 struct IDeviceContextVtbl
1324 {
1325 struct IObjectMethods Object;
1326 struct IDeviceContextMethods DeviceContext;
1327 };
13281324
13291325 // clang-format off
13301326
4141
4242 #define DILIGENT_INTERFACE_NAME IDeviceObject
4343 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
44 #define IDeviceObjectInclusiveMethods \
45 IObjectInclusiveMethods; \
46 IDeviceObjectMethods DeviceObject
4447
4548 /// Base interface for all objects created by the render device Diligent::IRenderDevice
4649 DILIGENT_BEGIN_INTERFACE(IDeviceObject, IObject)
7578
7679 // clang-format off
7780
78 struct IDeviceObjectVtbl
79 {
80 struct IObjectMethods Object;
81 struct IDeviceObjectMethods DeviceObject;
82 };
83
84 // clang-format off
85
8681 # define IDeviceObject_GetDesc(This) CALL_IFACE_METHOD(DeviceObject, GetDesc, This)
8782 # define IDeviceObject_GetUniqueID(This) CALL_IFACE_METHOD(DeviceObject, GetUniqueID, This)
8883
4343 #define DILIGENT_INTERFACE_NAME IEngineFactory
4444 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4545
46 #define IEngineFactoryInclusiveMethods \
47 IObjectInclusiveMethods; \
48 IEngineFactoryMethods EngineFactory
4649
4750 // clang-format off
4851
7679
7780 #if DILIGENT_C_INTERFACE
7881
79 // clang-format on
80
81 struct IEngineFactoryVtbl
82 {
83 struct IObjectMethods Object;
84 struct IEngineFactoryMethods EngineFactory;
85 };
86
8782 // clang-format off
8883
8984 # define IEngineFactory_GetAPIInfo(This) CALL_IFACE_METHOD(EngineFactory, GetAPIInfo, This)
4848 #define DILIGENT_INTERFACE_NAME IFence
4949 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
5050
51 #define IFenceInclusiveMethods \
52 IDeviceObjectInclusiveMethods; \
53 IFenceMethods Fence
5154
5255 /// Fence interface
5356
7982
8083 #if DILIGENT_C_INTERFACE
8184
82 // clang-format on
83
84 struct IFenceVtbl
85 {
86 struct IObjectMethods Object;
87 struct IDeviceObjectMethods DeviceObject;
88 struct IFenceMethods Fence;
89 };
90
9185 // clang-format off
9286
9387 # define IFence_GetDesc(This) (const struct FenceDesc*)IDeviceObject_GetDesc(This)
256256 #define DILIGENT_INTERFACE_NAME IPipelineState
257257 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
258258
259 #define IPipelineStateInclusiveMethods \
260 IDeviceObjectInclusiveMethods; \
261 IPipelineStateMethods PipelineState
262
259263 // clang-format off
260264
261265 /// Pipeline state interface
351355
352356 #if DILIGENT_C_INTERFACE
353357
354 // clang-format on
355
356 struct IPipelineStateVtbl
357 {
358 struct IObjectMethods Object;
359 struct IDeviceObjectMethods DeviceObject;
360 struct IPipelineStateMethods PipelineState;
361 };
362
363358 // clang-format off
364359
365360 # define IPipelineState_GetDesc(This) (const struct PipelineStateDesc*)IDeviceObject_GetDesc(This)
174174 #define DILIGENT_INTERFACE_NAME IQuery
175175 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
176176
177 #define IQueryInclusiveMethods \
178 IDeviceObjectInclusiveMethods; \
179 IQueryMethods Query
177180
178181 // clang-format off
179182
221224
222225 #if DILIGENT_C_INTERFACE
223226
224 // clang-format on
225
226 struct IQueryVtbl
227 {
228 struct IObjectMethods Object;
229 struct IDeviceObjectMethods DeviceObject;
230 struct IQueryMethods Query;
231 };
232
233227 // clang-format off
234228
235229 # define IQuery_GetDesc(This) (const struct QueryDesc*)IDeviceObject_GetDesc(This)
5959 #define DILIGENT_INTERFACE_NAME IRenderDevice
6060 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
6161
62 #define IRenderDeviceInclusiveMethods \
63 IObjectInclusiveMethods; \
64 IRenderDeviceMethods RenderDevice
6265
6366 // clang-format off
6467
241244
242245 #if DILIGENT_C_INTERFACE
243246
244 // clang-format on
245
246 struct IRenderDeviceVtbl
247 {
248 struct IObjectMethods Object;
249 struct IRenderDeviceMethods RenderDevice;
250 };
251
252247 // clang-format off
253248
254249 # define IRenderDevice_CreateBuffer(This, ...) CALL_IFACE_METHOD(RenderDevice, CreateBuffer, This, __VA_ARGS__)
9292 #define DILIGENT_INTERFACE_NAME IResourceMapping
9393 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
9494
95 #define IResourceMappingInclusiveMethods \
96 IObjectInclusiveMethods; \
97 IResourceMappingMethods ResourceMapping
9598
9699 // clang-format off
97100
169172
170173 #if DILIGENT_C_INTERFACE
171174
172 // clang-format on
173
174 struct IResourceMappingVtbl
175 {
176 struct IObjectMethods Object;
177 struct IResourceMappingMethods ResourceMapping;
178 };
179
180175 // clang-format off
181176
182177 # define IResourceMapping_AddResource(This, ...) CALL_IFACE_METHOD(ResourceMapping, AddResource, This, __VA_ARGS__)
173173 #define DILIGENT_INTERFACE_NAME ISampler
174174 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
175175
176 // clang-format off
177 #define ISamplerInclusiveMethods \
178 IDeviceObjectInclusiveMethods \
179 /*ISamplerMethods Sampler*/
180 // clang-format on
181
176182 #if DILIGENT_CPP_INTERFACE
177183
178184 // clang-format off
198204
199205 #if DILIGENT_C_INTERFACE
200206
201 // clang-format on
202
203 struct ISampler;
204
205 //struct ISamplerMethods
206 //{
207 //};
208
209 struct ISamplerVtbl
207 typedef struct ISamplerVtbl
210208 {
211 struct IObjectMethods Object;
212 struct IDeviceObjectMethods DeviceObject;
213 //struct ISamplerMethods Sampler;
214 };
209 ISamplerInclusiveMethods;
210 } ISamplerVtbl;
215211
216212 typedef struct ISampler
217213 {
8787 #define DILIGENT_INTERFACE_NAME IShaderSourceInputStreamFactory
8888 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
8989
90 #define IShaderSourceInputStreamFactoryInclusiveMethods \
91 IObjectInclusiveMethods; \
92 IShaderSourceInputStreamFactoryMethods ShaderSourceInputStreamFactory
9093
9194 /// Shader source stream factory interface
9295 DILIGENT_BEGIN_INTERFACE(IShaderSourceInputStreamFactory, IObject)
102105 #if DILIGENT_C_INTERFACE
103106
104107 // clang-format on
105
106 struct IShaderSourceInputStreamFactoryVtbl
107 {
108 struct IObjectMethods Object;
109 struct IShaderSourceInputStreamFactoryMethods ShaderSourceInputStreamFactory;
110 };
111108
112109 # define IShaderSourceInputStreamFactory_CreateInputStream(This, ...) CALL_IFACE_METHOD(ShaderSourceInputStreamFactory, CreateInputStream, This, __VA_ARGS__)
113110
313310 #define DILIGENT_INTERFACE_NAME IShader
314311 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
315312
313 #define IShaderInclusiveMethods \
314 IDeviceObjectInclusiveMethods; \
315 IShaderMethods Shader
316
316317 // clang-format off
317318
318319 /// Shader interface
337338
338339 #if DILIGENT_C_INTERFACE
339340
340 // clang-format on
341
342 struct IShaderVtbl
343 {
344 struct IObjectMethods Object;
345 struct IDeviceObjectMethods DeviceObject;
346 struct IShaderMethods Shader;
347 };
348
349341 // clang-format off
350342
351343 # define IShader_GetDesc(This) (const struct ShaderDesc*)IDeviceObject_GetDesc(This)
4646 #define DILIGENT_INTERFACE_NAME IShaderResourceBinding
4747 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4848
49
49 #define IShaderResourceBindingInclusiveMethods \
50 IObjectInclusiveMethods; \
51 IShaderResourceBindingMethods ShaderResourceBinding
5052
5153 // clang-format off
5254
132134
133135 #if DILIGENT_C_INTERFACE
134136
135 // clang-format on
136
137 struct IShaderResourceBindingVtbl
138 {
139 struct IObjectMethods Object;
140 struct IShaderResourceBindingMethods ShaderResourceBinding;
141 };
142
143137 // clang-format off
144138
145139 # define IShaderResourceBinding_GetPipelineState(This) CALL_IFACE_METHOD(ShaderResourceBinding, GetPipelineState, This)
106106 #define DILIGENT_INTERFACE_NAME IShaderResourceVariable
107107 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
108108
109
109 #define IShaderResourceVariableInclusiveMethods \
110 IObjectInclusiveMethods; \
111 IShaderResourceVariableMethods ShaderResourceVariable
110112
111113 // clang-format off
112114
158160
159161 #if DILIGENT_C_INTERFACE
160162
161 // clang-format on
162
163 struct IShaderResourceVariableVtbl
164 {
165 struct IObjectMethods Object;
166 struct IShaderResourceVariableMethods ShaderResourceVariable;
167 };
168
169163 // clang-format off
170164
171165 # define IShaderResourceVariable_Set(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, Set, This, __VA_ARGS__)
4343 #define DILIGENT_INTERFACE_NAME ISwapChain
4444 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4545
46 #define ISwapChainInclusiveMethods \
47 IObjectInclusiveMethods; \
48 ISwapChainMethods SwapChain
4649
4750 // clang-format off
4851
99102
100103 #if DILIGENT_C_INTERFACE
101104
102 // clang-format on
103
104 struct ISwapChainVtbl
105 {
106 struct IObjectMethods Object;
107 struct ISwapChainMethods SwapChain;
108 };
109
110105 // clang-format off
111106
112107 # define ISwapChain_Present(This, ...) CALL_IFACE_METHOD(SwapChain, Present, This, __VA_ARGS__)
310310 #define DILIGENT_INTERFACE_NAME ITexture
311311 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
312312
313
313 #define ITextureInclusiveMethods \
314 IDeviceObjectInclusiveMethods; \
315 ITextureMethods Texture
314316
315317 /// Texture inteface
316318 DILIGENT_BEGIN_INTERFACE(ITexture, IDeviceObject)
380382
381383 #if DILIGENT_C_INTERFACE
382384
383 // clang-format on
384
385 struct ITextureVtbl
386 {
387 struct IObjectMethods Object;
388 struct IDeviceObjectMethods DeviceObject;
389 struct ITextureMethods Texture;
390 };
391
392385 // clang-format off
393386
394387 # define ITexture_GetDesc(This) (const struct TextureDesc*)IDeviceObject_GetDesc(This)
186186 #define DILIGENT_INTERFACE_NAME ITextureView
187187 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
188188
189
189 #define ITextureViewInclusiveMethods \
190 IDeviceObjectInclusiveMethods; \
191 ITextureViewMethods TextureView
190192
191193 /// Texture view interface
192194
228230
229231 #if DILIGENT_C_INTERFACE
230232
231 // clang-format on
232
233 struct ITextureViewVtbl
234 {
235 struct IObjectMethods Object;
236 struct IDeviceObjectMethods DeviceObject;
237 struct ITextureViewMethods TextureView;
238 };
239
240233 # define ITextureView_GetDesc(This) (const struct TextureViewDesc*)IDeviceObject_GetDesc(This)
241234
242235 // clang-format off
4040 #define DILIGENT_INTERFACE_NAME IBufferD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IBufferD3D11InclusiveMethods \
44 IBufferInclusiveMethods; \
45 IBufferD3D11Methods BufferD3D11
46
4347 /// Exposes Direct3D11-specific functionality of a buffer object.
4448 DILIGENT_BEGIN_INTERFACE(IBufferD3D11, IBuffer)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct IBufferD3D11Vtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 struct IBufferMethods Buffer;
63 struct IBufferD3D11Methods BufferD3D11;
64 };
65
6662 # define IBufferD3D11_GetD3D11Buffer(This) CALL_IFACE_METHOD(BufferD3D11, GetD3D11Buffer, This)
6763
6864 #endif
4040 #define DILIGENT_INTERFACE_NAME IBufferViewD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IBufferViewD3D11InclusiveMethods \
44 IBufferViewInclusiveMethods; \
45 IBufferViewD3D11Methods BufferViewD3D11
46
4347 /// Exposes Direct3D11-specific functionality of a buffer view object.
4448 DILIGENT_BEGIN_INTERFACE(IBufferViewD3D11, IBufferView)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct IBufferViewD3D11Vtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 struct IBufferViewMethods BufferView;
63 struct IBufferViewD3D11Methods BufferViewD3D11;
64 };
65
6662 # define IBufferViewD3D11_GetD3D11View(This) CALL_IFACE_METHOD(BufferViewD3D11, GetD3D11View, This)
6763
6864 #endif
4040 #define DILIGENT_INTERFACE_NAME IDeviceContextD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IDeviceContextD3D11InclusiveMethods \
44 IDeviceContextInclusiveMethods; \
45 IDeviceContextD3D11Methods DeviceContextD3D11
46
4347 /// Exposes Direct3D11-specific functionality of a device context.
4448 DILIGENT_BEGIN_INTERFACE(IDeviceContextD3D11, IDeviceContext)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct IDeviceContextD3D11Vtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceContextMethods DeviceContext;
62 struct IDeviceContextD3D11Methods DeviceContextD3D11;
63 };
64
6562 # define IDeviceContextD3D11_GetD3D11DeviceContext(This) CALL_IFACE_METHOD(DeviceContextD3D11, GetD3D11DeviceContext, This)
6663
6764 #endif
4646
4747 #define DILIGENT_INTERFACE_NAME IEngineFactoryD3D11
4848 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
49
50 #define IEngineFactoryD3D11InclusiveMethods \
51 IEngineFactoryInclusiveMethods; \
52 IEngineFactoryD3D11Methods EngineFactoryD3D11
4953
5054 // clang-format off
5155
154158
155159 #if DILIGENT_C_INTERFACE
156160
157 // clang-format on
158
159 struct IEngineFactoryD3D11Vtbl
160 {
161 struct IObjectMethods Object;
162 struct IEngineFactoryMethods EngineFactory;
163 struct IEngineFactoryD3D11Methods EngineFactoryD3D11;
164 };
165
166161 // clang-format off
167162
168163 # define IEngineFactoryD3D11_CreateDeviceAndContextsD3D11(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, CreateDeviceAndContextsD3D11, This, __VA_ARGS__)
4040 #define DILIGENT_INTERFACE_NAME IFenceD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 // clang-format off
44 #define IFenceD3D11InclusiveMethods \
45 IFenceInclusiveMethods \
46 /*IFenceD3D11Methods FenceD3D11*/
47 // clang-format on
48
4349 #if DILIGENT_CPP_INTERFACE
4450
4551 /// Exposes Direct3D11-specific functionality of a fence object.
5561
5662 struct IFenceD3D11Vtbl
5763 {
58 struct IObjectMethods Object;
59 struct IDeviceObjectMethods DeviceObject;
60 struct IFenceMethods Fence;
61 //struct IFenceD3D11Methods FenceD3D11;
64 IFenceD3D11InclusiveMethods;
6265 };
6366
6467 typedef struct IFenceD3D11
3939
4040 #define DILIGENT_INTERFACE_NAME IPipelineStateD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
42
43 #define IPipelineStateD3D11InclusiveMethods \
44 IPipelineStateInclusiveMethods; \
45 IPipelineStateD3D11Methods PipelineStateD3D11
4246
4347 /// Exposes Direct3D11-specific functionality of a pipeline state object.
4448 DILIGENT_BEGIN_INTERFACE(IPipelineStateD3D11, IPipelineState)
112116
113117 #if DILIGENT_C_INTERFACE
114118
115 struct IPipelineStateD3D11Vtbl
116 {
117 struct IObjectMethods Object;
118 struct IDeviceObjectMethods DeviceObject;
119 struct IPipelineStateMethods PipelineState;
120 struct IPipelineStateD3D11Methods PipelineStateD3D11;
121 };
122
123119 // clang-format off
124120
125121 # define IPipelineStateD3D11_GetD3D11BlendState(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11BlendState, This)
4040 #define DILIGENT_INTERFACE_NAME IQueryD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IQueryD3D11InclusiveMethods \
44 IQueryInclusiveMethods; \
45 IQueryD3D11Methods QueryD3D11
46
4347 /// Exposes Direct3D11-specific functionality of a Query object.
4448 DILIGENT_BEGIN_INTERFACE(IQueryD3D11, IQuery)
4549 {
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct IQueryD3D11Vtbl
56 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IQueryMethods Query;
60 struct IQueryD3D11Methods QueryD3D11;
61 };
62
6359 # define IQueryD3D11_GetD3D11Query(This) CALL_IFACE_METHOD(QueryD3D11, GetD3D11Query, This)
6460
6561 #endif
3939
4040 #define DILIGENT_INTERFACE_NAME IRenderDeviceD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
42
43 #define IRenderDeviceD3D11InclusiveMethods \
44 IRenderDeviceInclusiveMethods; \
45 IRenderDeviceD3D11Methods RenderDeviceD3D11
4246
4347 // clang-format off
4448
114118
115119 #if DILIGENT_C_INTERFACE
116120
117 // clang-format on
118
119 struct IRenderDeviceD3D11Vtbl
120 {
121 struct IObjectMethods Object;
122 struct IRenderDeviceMethods RenderDevice;
123 struct IRenderDeviceD3D11Methods RenderDeviceD3D11;
124 };
125
126121 // clang-format off
127122
128123 # define IRenderDeviceD3D11_GetD3D11Device(This) CALL_IFACE_METHOD(RenderDeviceD3D11, GetD3D11Device, This)
4040 #define DILIGENT_INTERFACE_NAME ISamplerD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ISamplerD3D11InclusiveMethods \
44 ISamplerInclusiveMethods; \
45 ISamplerD3D11Methods SamplerD3D11
46
4347 /// Exposes Direct3D11-specific functionality of a sampler object.
4448 DILIGENT_BEGIN_INTERFACE(ISamplerD3D11, ISampler)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct ISamplerD3D11Vtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 //struct ISamplerMethods Sampler;
63 struct ISamplerD3D11Methods SamplerD3D11;
64 };
65
6662 # define ISamplerD3D11_GetD3D11SamplerState(This) CALL_IFACE_METHOD(SamplerD3D11, GetD3D11SamplerState, This)
6763
6864 #endif
4040 #define DILIGENT_INTERFACE_NAME IShaderD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IShaderD3D11InclusiveMethods \
44 IShaderD3DInclusiveMethods; \
45 IShaderD3D11Methods ShaderD3D11
46
4347 /// Exposes Direct3D11-specific functionality of a shader object.
4448 DILIGENT_BEGIN_INTERFACE(IShaderD3D11, IShaderD3D)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct IShaderD3D11Vtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 struct IShaderMethods Shader;
63 struct IShaderD3DMethods ShaderD3D;
64 struct IShaderD3D11Methods ShaderD3D11;
65 };
66
6762 # define IShaderD3D11_GetD3D11Shader(This) CALL_IFACE_METHOD(ShaderD3D11, GetD3D11Shader, This)
6863
6964 #endif
4040 #define DILIGENT_INTERFACE_NAME IShaderResourceBindingD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 // clang-format off
44 #define IShaderResourceBindingD3D11InclusiveMethods \
45 IShaderResourceBindingInclusiveMethods \
46 /*IShaderResourceBindingD3D11Methods ShaderResourceBindingD3D11*/
47 // clang-format on
48
4349 #if DILIGENT_CPP_INTERFACE
4450
4551 /// Exposes Direct3D11-specific functionality of a shader resource binding object.
5460
5561 struct IShaderResourceBindingD3D11Vtbl
5662 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IShaderResourceBindingMethods ShaderResourceBinding;
60 //struct IShaderResourceBindingD3D11Methods ShaderResourceBindingD3D11;
63 IShaderResourceBindingD3D11InclusiveMethods;
6164 };
6265
6366 typedef struct IShaderResourceBindingD3D11
4141 #define DILIGENT_INTERFACE_NAME ISwapChainD3D11
4242 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4343
44 #define ISwapChainD3D11InclusiveMethods \
45 ISwapChainInclusiveMethods; \
46 ISwapChainD3D11Methods SwapChainD3D11
47
4448 /// Exposes Direct3D11-specific functionality of a swap chain.
4549 DILIGENT_BEGIN_INTERFACE(ISwapChainD3D11, ISwapChain)
4650 {
6266
6367 #if DILIGENT_C_INTERFACE
6468
65 struct ISwapChainD3D11Vtbl
66 {
67 struct IObjectMethods Object;
68 struct IDeviceObjectMethods DeviceObject;
69 struct ISwapChainMethods SwapChain;
70 struct ISwapChainD3D11Methods SwapChainD3D11;
71 };
72
7369 // clang-format off
7470
7571 # define ISwapChainD3D11_GetCurrentBackBufferRTV(This) CALL_IFACE_METHOD(SwapChainD3D11, GetCurrentBackBufferRTV, This)
4040 #define DILIGENT_INTERFACE_NAME ITextureD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ITextureD3D11InclusiveMethods \
44 ITextureInclusiveMethods; \
45 ITextureD3D11Methods TextureD3D11
46
4347 /// Exposes Direct3D11-specific functionality of a texture object.
4448 DILIGENT_BEGIN_INTERFACE(ITextureD3D11, ITexture)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct ITextureD3D11Vtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 struct ITextureMethods Texture;
63 struct ITextureD3D11Methods TextureD3D11;
64 };
65
6662 # define ITextureD3D11_GetD3D11Texture(This) CALL_IFACE_METHOD(TextureD3D11, GetD3D11Texture, This)
6763
6864 #endif
4040 #define DILIGENT_INTERFACE_NAME ITextureViewD3D11
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ITextureViewD3D11InclusiveMethods \
44 ITextureViewInclusiveMethods; \
45 ITextureViewD3D11Methods TextureViewD3D11
46
4347 /// Exposes Direct3D11-specific functionality of a texture view object.
4448 DILIGENT_BEGIN_INTERFACE(ITextureViewD3D11, ITextureView)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct ITextureViewD3D11Vtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 struct ITextureViewMethods TextureView;
63 struct ITextureViewD3D11Methods TextureViewD3D11;
64 };
65
6662 # define ITextureViewD3D11_GetD3D11View(This) CALL_IFACE_METHOD(TextureViewD3D11, GetD3D11View, This)
6763
6864 #endif
4141 #define DILIGENT_INTERFACE_NAME IBufferD3D12
4242 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4343
44 #define IBufferD3D12InclusiveMethods \
45 IBufferInclusiveMethods; \
46 IBufferD3D12Methods BufferD3D12
47
4448 // clang-format off
4549
4650 /// Exposes Direct3D12-specific functionality of a buffer object.
7680
7781 #if DILIGENT_C_INTERFACE
7882
79 struct IBufferD3D12Vtbl
80 {
81 struct IObjectMethods Object;
82 struct IDeviceObjectMethods DeviceObject;
83 struct IBufferMethods Buffer;
84 struct IBufferD3D12Methods BufferD3D12;
85 };
86
8783 # define IBufferD3D12_GetD3D12Buffer(This, ...) CALL_IFACE_METHOD(BufferD3D12, GetD3D12Buffer, This, __VA_ARGS__)
8884 # define IBufferD3D12_SetD3D12ResourceState(This, ...) CALL_IFACE_METHOD(BufferD3D12, SetD3D12ResourceState, This, __VA_ARGS__)
8985 # define IBufferD3D12_GetD3D12ResourceState(This) CALL_IFACE_METHOD(BufferD3D12, GetD3D12ResourceState, This)
4040 #define DILIGENT_INTERFACE_NAME IBufferViewD3D12
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IBufferViewD3D12InclusiveMethods \
44 IBufferViewInclusiveMethods; \
45 IBufferViewD3D12Methods BufferViewD3D12
46
4347 /// Exposes Direct3D12-specific functionality of a buffer view object.
4448 DILIGENT_BEGIN_INTERFACE(IBufferViewD3D12, IBufferView)
4549 {
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct IBufferViewD3D12Vtbl
56 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IBufferViewMethods BufferView;
60 struct IBufferViewD3D12Methods BufferViewD3D12;
61 };
62
6359 # define IBufferViewD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(BufferViewD3D12, GetCPUDescriptorHandle, This)
6460
6561 #endif
4040 #define DILIGENT_INTERFACE_NAME ICommandQueueD3D12
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ICommandQueueD3D12InclusiveMethods \
44 IObjectInclusiveMethods; \
45 ICommandQueueD3D12Methods CommandQueueD3D12
46
4347 // clang-format off
4448
4549 /// Command queue interface
7478
7579 #if DILIGENT_C_INTERFACE
7680
77 // clang-format on
78
79 struct ICommandQueueD3D12Vtbl
80 {
81 struct IObjectMethods Object;
82 struct ICommandQueueD3D12Methods CommandQueueD3D12;
83 };
84
8581 // clang-format off
8682
8783 # define ICommandQueueD3D12_GetNextFenceValue(This) CALL_IFACE_METHOD(CommandQueueD3D12, GetNextFenceValue, This)
4040
4141 #define DILIGENT_INTERFACE_NAME IDeviceContextD3D12
4242 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
43
44 #define IDeviceContextD3D12InclusiveMethods \
45 IDeviceContextInclusiveMethods; \
46 IDeviceContextD3D12Methods DeviceContextD3D12
4347
4448 // clang-format off
4549
108112
109113 #if DILIGENT_C_INTERFACE
110114
111 // clang-format on
112
113 struct IDeviceContextD3D12Vtbl
114 {
115 struct IObjectMethods Object;
116 struct IDeviceContextMethods DeviceContext;
117 struct IDeviceContextD3D12Methods DeviceContextD3D12;
118 };
119
120115 // clang-format off
121116
122117 # define IDeviceContextD3D12_TransitionTextureState(This, ...) CALL_IFACE_METHOD(DeviceContextD3D12, TransitionTextureState,This, __VA_ARGS__)
5151
5252 // clang-format off
5353
54 #define IEngineFactoryD3D12InclusiveMethods \
55 IEngineFactoryInclusiveMethods; \
56 IEngineFactoryD3D12Methods EngineFactoryD3D12
57
5458 /// Engine factory for Direct3D12 rendering backend
5559 DILIGENT_BEGIN_INTERFACE(IEngineFactoryD3D12, IEngineFactory)
5660 {
175179
176180 #if DILIGENT_C_INTERFACE
177181
178 // clang-format on
179
180 struct IEngineFactoryD3D12Vtbl
181 {
182 struct IObjectMethods Object;
183 struct IEngineFactoryMethods EngineFactory;
184 struct IEngineFactoryD3D12Methods EngineFactoryD3D12;
185 };
186
187182 // clang-format off
188183
189184 # define IEngineFactoryD3D12_LoadD3D12(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D12, LoadD3D12, This, __VA_ARGS__)
4242
4343 // clang-format off
4444
45 #define IFenceD3D12InclusiveMethods \
46 IFenceInclusiveMethods; \
47 IFenceD3D12Methods FenceD3D12
48
4549 /// Exposes Direct3D12-specific functionality of a fence object.
4650 DILIGENT_BEGIN_INTERFACE(IFenceD3D12, IFence)
4751 {
6367
6468 // clang-format off
6569
66 struct IFenceD3D12Vtbl
67 {
68 struct IObjectMethods Object;
69 struct IDeviceObjectMethods DeviceObject;
70 struct IFenceMethods Fence;
71 struct IFenceD3D12Methods FenceD3D12;
72 };
73
74 // clang-format off
75
7670 # define IFenceD3D12_GetD3D12Fence(This) CALL_IFACE_METHOD(FenceD3D12, GetD3D12Fence, This)
7771 # define IFenceD3D12_WaitForCompletion(This, ...) CALL_IFACE_METHOD(FenceD3D12, WaitForCompletion, This, __VA_ARGS__)
7872
4040 #define DILIGENT_INTERFACE_NAME IPipelineStateD3D12
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IPipelineStateD3D12InclusiveMethods \
44 IPipelineStateInclusiveMethods; \
45 IPipelineStateD3D12Methods PipelineStateD3D12
46
4347 /// Exposes Direct3D12-specific functionality of a pipeline state object.
4448 DILIGENT_BEGIN_INTERFACE(IPipelineStateD3D12, IPipelineState)
4549 {
6165
6266 #if DILIGENT_C_INTERFACE
6367
64 struct IPipelineStateD3D12Vtbl
65 {
66 struct IObjectMethods Object;
67 struct IDeviceObjectMethods DeviceObject;
68 struct IPipelineStateMethods PipelineState;
69 struct IPipelineStateD3D12Methods PipelineStateD3D12;
70 };
71
7268 // clang-format off
7369
7470 # define IPipelineStateD3D12_GetD3D12PipelineState(This) CALL_IFACE_METHOD(PipelineStateD3D12, GetD3D12PipelineState, This)
4040 #define DILIGENT_INTERFACE_NAME IQueryD3D12
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IQueryD3D12InclusiveMethods \
44 IQueryInclusiveMethods; \
45 IQueryD3D12Methods QueryD3D12
46
4347 /// Exposes Direct3D12-specific functionality of a Query object.
4448 DILIGENT_BEGIN_INTERFACE(IQueryD3D12, IQuery)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct IQueryD3D12Vtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 struct IQueryMethods Query;
63 struct IQueryD3D12Methods QueryD3D12;
64 };
65
6662 # define IQueryD3D12_GetD3D12QueryHeap(This) CALL_IFACE_METHOD(QueryD3D12, GetD3D12QueryHeap, This)
6763 # define IQueryD3D12_GetQueryHeapIndex(This) CALL_IFACE_METHOD(QueryD3D12, GetQueryHeapIndex, This)
6864
3939
4040 #define DILIGENT_INTERFACE_NAME IRenderDeviceD3D12
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
42
43 #define IRenderDeviceD3D12InclusiveMethods \
44 IRenderDeviceInclusiveMethods; \
45 IRenderDeviceD3D12Methods RenderDeviceD3D12
4246
4347 // clang-format off
4448
101105
102106 #if DILIGENT_C_INTERFACE
103107
104 // clang-format on
105
106 struct IRenderDeviceD3D12Vtbl
107 {
108 struct IObjectMethods Object;
109 struct IRenderDeviceMethods RenderDevice;
110 struct IRenderDeviceD3D12Methods RenderDeviceD3D12;
111 };
112
113108 // clang-format off
114109
115110 # define IRenderDeviceD3D12_GetD3D12Device(This) CALL_IFACE_METHOD(RenderDeviceD3D12, GetD3D12Device, This)
4040 #define DILIGENT_INTERFACE_NAME ISamplerD3D12
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ISamplerD3D12InclusiveMethods \
44 ISamplerInclusiveMethods; \
45 ISamplerD3D12Methods SamplerD3D12
46
4347 /// Exposes Direct3D12-specific functionality of a sampler object.
4448 DILIGENT_BEGIN_INTERFACE(ISamplerD3D12, ISampler)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct ISamplerD3D12Vtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 //struct ISamplerMethods Sampler;
63 struct ISamplerD3D12Methods SamplerD3D12;
64 };
65
6662 # define ISamplerD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(SamplerD3D12, GetCPUDescriptorHandle, This)
6763
6864 #endif
4040 #define DILIGENT_INTERFACE_NAME IShaderD3D12
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 // clang-format off
44 #define IShaderD3D12InclusiveMethods \
45 IShaderD3DInclusiveMethods \
46 /*IShaderD3D12Methods ShaderD3D12*/
47 // clang-format on
48
4349 #if DILIGENT_CPP_INTERFACE
4450
4551 /// Exposes Direct3D12-specific functionality of a shader object.
6066
6167 struct IShaderD3D12Vtbl
6268 {
63 struct IObjectMethods Object;
64 struct IDeviceObjectMethods DeviceObject;
65 struct IShaderMethods Shader;
66 struct IShaderD3DMethods ShaderD3D;
67 //struct IShaderD3D12Methods ShaderD3D12;
69 IShaderD3D12InclusiveMethods;
6870 };
6971
7072 typedef struct IShaderD3D12
4040 #define DILIGENT_INTERFACE_NAME IShaderResourceBindingD3D12
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 // clang-format off
44 #define IShaderResourceBindingD3D12InclusiveMethods \
45 IShaderResourceBindingInclusiveMethods \
46 /*IShaderResourceBindingD3D12Methods ShaderResourceBindingD3D12*/
47 // clang-format on
48
4349 #if DILIGENT_CPP_INTERFACE
4450
4551 /// Exposes Direct3D12-specific functionality of a shader resource binding.
5460
5561 struct IShaderResourceBindingD3D12Vtbl
5662 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IShaderResourceBindingMethods ShaderResourceBinding;
60 //struct IShaderResourceBindingD3D12Methods ShaderResourceBindingD3D12;
63 IShaderResourceBindingD3D12InclusiveMethods;
6164 };
6265
6366 typedef struct IShaderResourceBindingD3D12
4343 #define DILIGENT_INTERFACE_NAME ISwapChainD3D12
4444 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4545
46 #define ISwapChainD3D12InclusiveMethods \
47 ISwapChainInclusiveMethods; \
48 ISwapChainD3D12Methods SwapChainD3D12
49
4650 /// Exposes Direct3D12-specific functionality of a swap chain.
4751 DILIGENT_BEGIN_INTERFACE(ISwapChainD3D12, ISwapChain)
4852 {
5862
5963 #if DILIGENT_C_INTERFACE
6064
61 struct ISwapChainD3D12Vtbl
62 {
63 struct IObjectMethods Object;
64 struct IDeviceObjectMethods DeviceObject;
65 struct ISwapChainMethods SwapChain;
66 struct ISwapChainD3D12Methods SwapChainD3D12;
67 };
68
6965 // clang-format off
7066
7167 # define ISwapChainD3D12_GetDXGISwapChain(This) CALL_IFACE_METHOD(SwapChainD3D12, GetDXGISwapChain, This)
4040 #define DILIGENT_INTERFACE_NAME ITextureD3D12
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ITextureD3D12InclusiveMethods \
44 ITextureInclusiveMethods; \
45 ITextureD3D12Methods TextureD3D12
46
4347 // clang-format off
4448
4549 /// Exposes Direct3D12-specific functionality of a texture object.
6872
6973 #if DILIGENT_C_INTERFACE
7074
71 // clang-format on
72
73 struct ITextureD3D12Vtbl
74 {
75 struct IObjectMethods Object;
76 struct IDeviceObjectMethods DeviceObject;
77 struct ITextureMethods Texture;
78 struct ITextureD3D12Methods TextureD3D12;
79 };
80
8175 // clang-format off
8276
8377 # define ITextureD3D12_GetD3D12Texture(This) CALL_IFACE_METHOD(TextureD3D12, GetD3D12Texture, This)
4040 #define DILIGENT_INTERFACE_NAME ITextureViewD3D12
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ITextureViewD3D12InclusiveMethods \
44 ITextureViewInclusiveMethods; \
45 ITextureViewD3D12Methods TextureViewD3D12
46
4347 /// Exposes Direct3D12-specific functionality of a texture view object.
4448 DILIGENT_BEGIN_INTERFACE(ITextureViewD3D12, ITextureView)
4549 {
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct ITextureViewD3D12Vtbl
56 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct ITextureViewMethods TextureView;
60 struct ITextureViewD3D12Methods TextureViewD3D12;
61 };
62
6359 # define ITextureViewD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(TextureViewD3D12, GetCPUDescriptorHandle, This)
6460
6561 #endif
5353 #define DILIGENT_INTERFACE_NAME IShaderD3D
5454 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
5555
56 #define IShaderD3DInclusiveMethods \
57 IShaderInclusiveMethods; \
58 IShaderD3DMethods ShaderD3D
59
5660 // clang-format off
5761
5862 /// Exposes Direct3D-specific functionality of a shader object.
6973
7074 #if DILIGENT_C_INTERFACE
7175
72 // clang-format on
73
74 struct IShaderD3DVtbl
75 {
76 struct IObjectMethods Object;
77 struct IDeviceObjectMethods DeviceObject;
78 struct IShaderD3DMethods ShaderD3D;
79 };
80
8176 // clang-format off
8277
8378 # define IShaderD3D_GetHLSLResource(This, ...) CALL_IFACE_METHOD(ShaderD3D, GetHLSLResource, This, __VA_ARGS__)
3333
3434 DILIGENT_BEGIN_NAMESPACE(Diligent)
3535
36 // {08DF7319-F425-4EC7-8D2B-1B3FC0BDDBB4}
37 static const INTERFACE_ID IID_BufferGL =
38 {0x8df7319, 0xf425, 0x4ec7, {0x8d, 0x2b, 0x1b, 0x3f, 0xc0, 0xbd, 0xdb, 0xb4}};
39
3640 #define DILIGENT_INTERFACE_NAME IBufferGL
3741 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
3842
39 // {08DF7319-F425-4EC7-8D2B-1B3FC0BDDBB4}
40 static const INTERFACE_ID IID_BufferGL =
41 {0x8df7319, 0xf425, 0x4ec7, {0x8d, 0x2b, 0x1b, 0x3f, 0xc0, 0xbd, 0xdb, 0xb4}};
43 #define IBufferGLInclusiveMethods \
44 IBufferInclusiveMethods; \
45 IBufferGLMethods BufferGL
4246
4347 /// Exposes OpenGL-specific functionality of a buffer object.
4448 DILIGENT_BEGIN_INTERFACE(IBufferGL, IBuffer)
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct IBufferGLVtbl
56 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IBufferMethods Buffer;
60 struct IBufferGLMethods BufferGL;
61 };
62
6359 # define IBufferGL_GetGLBufferHandle(This) CALL_IFACE_METHOD(BufferGL, GetGLBufferHandle, This)
6460
6561 #endif
4040 #define DILIGENT_INTERFACE_NAME IBufferViewGL
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IBufferViewGLInclusiveMethods \
44 IBufferViewInclusiveMethods
45 //IBufferViewGLMethods BufferViewGL
46
4347 #if DILIGENT_CPP_INTERFACE
4448
4549 /// Exposes OpenGL-specific functionality of a buffer view object.
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct IBufferViewGLVtbl
59 typedef struct IBufferViewGLVtbl
5660 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IBufferViewMethods BufferView;
60 //struct IBufferViewGLMethods BufferViewGL;
61 };
61 IBufferViewGLInclusiveMethods;
62 } IBufferViewGLVtbl;
6263
6364 typedef struct IBufferViewGL
6465 {
4242 #define DILIGENT_INTERFACE_NAME IDeviceContextGL
4343 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4444
45 #define IDeviceContextGLInclusiveMethods \
46 IDeviceContextInclusiveMethods; \
47 IDeviceContextGLMethods DeviceContextGL
48
4549 // clang-format off
4650
4751 /// Exposes OpenGL-specific functionality of a device context.
6771
6872 #if DILIGENT_C_INTERFACE
6973
70 // clang-format on
71
72 struct IDeviceContextGLVtbl
73 {
74 struct IObjectMethods Object;
75 struct IDeviceContextMethods DeviceContext;
76 struct IDeviceContextGLMethods DeviceContextGL;
77 };
78
7974 // clang-format off
8075
8176 # define IDeviceContextGL_UpdateCurrentGLContext(This) CALL_IFACE_METHOD(DeviceContextGL, UpdateCurrentGLContext, This)
6060 #define DILIGENT_INTERFACE_NAME IEngineFactoryOpenGL
6161 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
6262
63 #define IEngineFactoryOpenGLInclusiveMethods \
64 IEngineFactoryInclusiveMethods; \
65 IEngineFactoryOpenGLMethods EngineFactoryOpenGL
66
6367 // clang-format off
6468
6569 DILIGENT_BEGIN_INTERFACE(IEngineFactoryOpenGL, IEngineFactory)
8488 #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
8589
8690 #if DILIGENT_C_INTERFACE
87
88 // clang-format on
89
90 struct IEngineFactoryOpenGLVtbl
91 {
92 struct IObjectMethods Object;
93 struct IEngineFactoryMethods EngineFactory;
94 struct IEngineFactoryOpenGLMethods EngineFactoryOpenGL;
95 };
9691
9792 // clang-format off
9893
4040 #define DILIGENT_INTERFACE_NAME IFenceGL
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IFenceGLInclusiveMethods \
44 IFenceInclusiveMethods
45 //IFenceGLMethods FenceGL
46
4347 #if DILIGENT_CPP_INTERFACE
4448
4549 /// Exposes OpenGL-specific functionality of a fence object.
5458
5559 struct IFenceGLVtbl
5660 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IFenceMethods Fence;
60 //struct IFenceGLMethods FenceGL;
61 IFenceGLInclusiveMethods;
6162 };
6263
6364 typedef struct IFenceGL
4040 #define DILIGENT_INTERFACE_NAME IPipelineStateGL
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IPipelineStateGLInclusiveMethods \
44 IPipelineStateInclusiveMethods
45 //IPipelineStateGLMethods PipelineStateGL
46
4347 #if DILIGENT_CPP_INTERFACE
4448
4549 /// Exposes OpenGL-specific functionality of a pipeline state object.
5458
5559 struct IPipelineStateGLVtbl
5660 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IPipelineStateMethods PipelineState;
60 //struct IPipelineStateGLMethods PipelineStateGL;
61 IPipelineStateGLInclusiveMethods;
6162 };
6263
6364 typedef struct IPipelineStateGL
3737 static const INTERFACE_ID IID_QueryGL =
3838 {0xd8a02ab7, 0x720, 0x417d, {0xaa, 0x9b, 0x20, 0xa2, 0xc0, 0x5a, 0x3e, 0xe0}};
3939
40
4140 #define DILIGENT_INTERFACE_NAME IQueryGL
4241 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
42
43 #define IQueryGLInclusiveMethods \
44 IQueryInclusiveMethods; \
45 IQueryGLMethods QueryGL
4346
4447 /// Exposes OpenGL-specific functionality of a Query object.
4548 DILIGENT_BEGIN_INTERFACE(IQueryGL, IQuery)
5356
5457 #if DILIGENT_C_INTERFACE
5558
56 struct IQueryGLVtbl
57 {
58 struct IObjectMethods Object;
59 struct IDeviceObjectMethods DeviceObject;
60 struct IQueryMethods Query;
61 struct IQueryGLMethods QueryGL;
62 };
63
6459 # define IQueryGL_GetGlQueryHandle(This) CALL_IFACE_METHOD(QueryGL, GetGlQueryHandle, This)
6560
6661 #endif
4040
4141 #define DILIGENT_INTERFACE_NAME IRenderDeviceGL
4242 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
43
44 #define IRenderDeviceGLInclusiveMethods \
45 IRenderDeviceInclusiveMethods; \
46 IRenderDeviceGLMethods RenderDeviceGL
4347
4448 // clang-format off
4549
109113
110114 #if DILIGENT_C_INTERFACE
111115
112 // clang-format on
113
114 struct IRenderDeviceGLVtbl
115 {
116 struct IObjectMethods Object;
117 struct IRenderDeviceMethods RenderDevice;
118 struct IRenderDeviceGLMethods RenderDeviceGL;
119 };
120
121116 // clang-format off
122117
123118 # define IRenderDeviceGL_CreateTextureFromGLHandle(This, ...)CALL_IFACE_METHOD(RenderDeviceGL, CreateTextureFromGLHandle, This, __VA_ARGS__)
4040 #define DILIGENT_INTERFACE_NAME ISamplerGL
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ISamplerGLInclusiveMethods \
44 ISamplerInclusiveMethods
45 //ISamplerGLMethods SamplerGL
46
4347 #if DILIGENT_CPP_INTERFACE
4448
4549 /// Exposes OpenGL-specific functionality of a sampler object.
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct ISamplerGLVtbl
59 typedef struct ISamplerGLVtbl
5660 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 //struct ISamplerMethods Sampler;
60 //struct ISamplerGLMethods SamplerGL;
61 };
61 ISamplerGLInclusiveMethods;
62 } ISamplerGLVtbl;
6263
6364 typedef struct ISamplerGL
6465 {
4040 #define DILIGENT_INTERFACE_NAME IShaderGL
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IShaderGLInclusiveMethods \
44 IShaderInclusiveMethods
45 //IShaderGLMethods ShaderGL
46
4347 #if DILIGENT_CPP_INTERFACE
4448
4549 /// Exposes OpenGL-specific functionality of a shader object.
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct IShaderGLVtbl
59 typedef struct IShaderGLVtbl
5660 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IShaderMethods Shader;
60 //struct IShaderGLMethods ShaderGL;
61 };
61 IShaderGLInclusiveMethods;
62 } IShaderGLVtbl;
6263
6364 #endif
6465
4040 #define DILIGENT_INTERFACE_NAME IShaderResourceBindingGL
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IShaderResourceBindingGLInclusiveMethods \
44 IShaderResourceBindingInclusiveMethods
45 //IShaderResourceBindingGLMethods ShaderResourceBindingGL
46
4347 #if DILIGENT_CPP_INTERFACE
4448
4549 /// Exposes OpenGL-specific functionality of a shader resource binding object.
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct IShaderResourceBindingGLVtbl
59 typedef struct IShaderResourceBindingGLVtbl
5660 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IShaderResourceBindingMethods ShaderResourceBinding;
60 //struct IShaderResourceBindingGLMethods ShaderResourceBindingGL;
61 };
61 IShaderResourceBindingGLInclusiveMethods;
62 } IShaderResourceBindingGLVtbl;
6263
6364 #endif
6465
3737 static const INTERFACE_ID IID_SwapChainGL =
3838 {0xf457bd7c, 0xe725, 0x4d3e, {0x86, 0x7, 0xa1, 0xf9, 0xba, 0xe3, 0x29, 0xeb}};
3939
40 #define ISwapChainGLInclusiveMethods \
41 ISwapChainInclusiveMethods; \
42 ISwapChainGLMethods SwapChainGL
43
4044 #define DILIGENT_INTERFACE_NAME ISwapChainGL
4145 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4246
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct ISwapChainGLVtbl
56 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct ISwapChainMethods SwapChain;
60 struct ISwapChainGLMethods SwapChainGL;
61 };
62
6359 // clang-format off
6460
6561 # define ISwapChainGL_GetDefaultFBO(This) CALL_IFACE_METHOD(SwapChainGL, GetDefaultFBO, This)
4040 #define DILIGENT_INTERFACE_NAME ITextureGL
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ITextureGLInclusiveMethods \
44 ITextureInclusiveMethods; \
45 ITextureGLMethods TextureGL
46
4347 /// Exposes OpenGL-specific functionality of a texture object.
4448 DILIGENT_BEGIN_INTERFACE(ITextureGL, ITexture)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct ITextureGLVtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 struct ITextureMethods Texture;
63 struct ITextureGLMethods TextureGL;
64 };
65
6662 // clang-format off
6763
6864 # define ITextureGL_GetGLTextureHandle(This) CALL_IFACE_METHOD(TextureGL, GetGLTextureHandle, This)
4040 #define DILIGENT_INTERFACE_NAME ITextureViewGL
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ITextureViewGLInclusiveMethods \
44 ITextureViewInclusiveMethods
45 //ITextureViewGLMethods TextureViewGL
46
4347 #if DILIGENT_CPP_INTERFACE
4448
4549 /// Exposes OpenGL-specific functionality of a texture view object.
5660
5761 #if DILIGENT_C_INTERFACE
5862
59 struct ITextureViewGLVtbl
63 typedef struct ITextureViewGLVtbl
6064 {
61 struct IObjectMethods Object;
62 struct IDeviceObjectMethods DeviceObject;
63 struct ITextureViewMethods TextureView;
64 //struct ITextureViewGLMethods TextureViewGL;
65 };
65 ITextureViewGLInclusiveMethods;
66 } ITextureViewGLVtbl;
6667
6768 typedef struct ITextureViewGL
6869 {
4040 #define DILIGENT_INTERFACE_NAME IBufferViewVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IBufferViewVkInclusiveMethods \
44 IBufferViewInclusiveMethods; \
45 IBufferViewVkMethods BufferViewVk
46
4347 // clang-format off
4448
4549 /// Exposes Vulkan-specific functionality of a buffer view object.
5458
5559 #if DILIGENT_C_INTERFACE
5660
57 // clang-format on
58
59 struct IBufferViewVkVtbl
60 {
61 struct IObjectMethods Object;
62 struct IDeviceObjectMethods DeviceObject;
63 struct IBufferViewMethods BufferView;
64 struct IBufferViewVkMethods BufferViewVk;
65 };
66
6761 // clang-format off
6862
6963 # define IBufferViewVk_GetVkBufferView(This) CALL_IFACE_METHOD(BufferViewVk, GetVkBufferView, This)
4040 #define DILIGENT_INTERFACE_NAME IBufferVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IBufferVkInclusiveMethods \
44 IBufferInclusiveMethods; \
45 IBufferVkMethods BufferVk
46
4347 // clang-format off
4448
4549 /// Exposes Vulkan-specific functionality of a buffer object.
6468
6569 #if DILIGENT_C_INTERFACE
6670
67 // clang-format on
68
69 struct IBufferVkVtbl
70 {
71 struct IObjectMethods Object;
72 struct IDeviceObjectMethods DeviceObject;
73 struct IBufferMethods Buffer;
74 struct IBufferVkMethods BufferVk;
75 };
76
7771 # define IBufferVk_GetVkBuffer(This) CALL_IFACE_METHOD(BufferVk, GetVkBuffer, This)
7872 # define IBufferVk_SetAccessFlags(This, ...) CALL_IFACE_METHOD(BufferVk, SetAccessFlags, This, __VA_ARGS__)
7973 # define IBufferVk_GetAccessFlags(This) CALL_IFACE_METHOD(BufferVk, GetAccessFlags, This)
3939
4040 #define DILIGENT_INTERFACE_NAME ICommandQueueVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
42
43 #define ICommandQueueVkInclusiveMethods \
44 IObjectInclusiveMethods; \
45 ICommandQueueVkMethods CommandQueueVk
4246
4347 // clang-format off
4448
8892
8993 #if DILIGENT_C_INTERFACE
9094
91 // clang-format on
92
93 struct ICommandQueueVkVtbl
94 {
95 struct IObjectMethods Object;
96 struct ICommandQueueVkMethods CommandQueueVk;
97 };
98
9995 // clang-format off
10096
10197 # define ICommandQueueVk_GetNextFenceValue(This) CALL_IFACE_METHOD(CommandQueueVk, GetNextFenceValue, This)
4040
4141 #define DILIGENT_INTERFACE_NAME IDeviceContextVk
4242 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
43
44 #define IDeviceContextVkInclusiveMethods \
45 IDeviceContextInclusiveMethods; \
46 IDeviceContextVkMethods DeviceContextVk
4347
4448 // clang-format off
4549
9195
9296 #if DILIGENT_C_INTERFACE
9397
94 // clang-format on
95
96 struct IDeviceContextVkVtbl
97 {
98 struct IObjectMethods Object;
99 struct IDeviceContextMethods DeviceContext;
100 struct IDeviceContextVkMethods DeviceContextVk;
101 };
102
10398 // clang-format off
10499
105100 # define IDeviceContextVk_TransitionImageLayout(This, ...) CALL_IFACE_METHOD(DeviceContextVk, TransitionImageLayout, This, __VA_ARGS__)
5757 #define DILIGENT_INTERFACE_NAME IEngineFactoryVk
5858 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
5959
60 #define IEngineFactoryVkInclusiveMethods \
61 IEngineFactoryInclusiveMethods; \
62 IEngineFactoryVkMethods EngineFactoryVk
63
6064 // clang-format off
6165
6266 DILIGENT_BEGIN_INTERFACE(IEngineFactoryVk, IEngineFactory)
8589
8690 #if DILIGENT_C_INTERFACE
8791
88 // clang-format on
89
90 struct IEngineFactoryVkVtbl
91 {
92 struct IObjectMethods Object;
93 struct IEngineFactoryMethods EngineFactory;
94 struct IEngineFactoryVkMethods EngineFactoryVk;
95 };
96
9792 // clang-format off
9893
9994 # define IEngineFactoryVk_CreateDeviceAndContextsVk(This, ...) CALL_IFACE_METHOD(EngineFactoryVk, CreateDeviceAndContextsVk, This, __VA_ARGS__)
4040 #define DILIGENT_INTERFACE_NAME IFenceVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IFenceVkInclusiveMethods \
44 IFenceInclusiveMethods
45 //IFenceVkMethods FenceVk
46
4347 // clang-format off
4448
4549 #if DILIGENT_CPP_INTERFACE
5862
5963 // clang-format off
6064
61 struct IFenceVkVtbl
65 typedef struct IFenceVkVtbl
6266 {
63 struct IObjectMethods Object;
64 struct IDeviceObjectMethods DeviceObject;
65 struct IFenceMethods Fence;
66 //struct IFenceVkMethods FenceVk;
67 };
67 IFenceVkInclusiveMethods;
68 } IFenceVkVtbl;
6869
6970 typedef struct IFenceVk
7071 {
4040 #define DILIGENT_INTERFACE_NAME IPipelineStateVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IPipelineStateVkInclusiveMethods \
44 IPipelineStateInclusiveMethods; \
45 IPipelineStateVkMethods PipelineStateVk
46
4347 /// Exposes Vulkan-specific functionality of a pipeline state object.
4448 DILIGENT_BEGIN_INTERFACE(IPipelineStateVk, IPipelineState)
4549 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct IPipelineStateVkVtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 struct IPipelineStateMethods PipelineState;
63 struct IPipelineStateVkMethods PipelineStateVk;
64 };
65
6662 // clang-format off
6763
6864 # define IPipelineStateVk_GetVkRenderPass(This) CALL_IFACE_METHOD(PipelineStateVk, GetVkRenderPass, This)
4040 #define DILIGENT_INTERFACE_NAME IQueryVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IQueryVkInclusiveMethods \
44 IQueryInclusiveMethods
45 //IQueryVkMethods QueryVk
46
4347 #if DILIGENT_CPP_INTERFACE
4448
4549 /// Exposes Vulkan-specific functionality of a Query object.
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct IQueryVkVtbl
59 typedef struct IQueryVkVtbl
5660 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IQueryMethods Query;
60 //struct IQueryVkMethods QueryVk;
61 };
61 IQueryVkInclusiveMethods;
62 } IQueryVkVtbl;
6263
6364 typedef struct IQueryVk
6465 {
3939
4040 #define DILIGENT_INTERFACE_NAME IRenderDeviceVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
42
43 #define IRenderDeviceVkInclusiveMethods \
44 IRenderDeviceInclusiveMethods; \
45 IRenderDeviceVkMethods RenderDeviceVk
4246
4347 // clang-format off
4448
114118
115119 #if DILIGENT_C_INTERFACE
116120
117 // clang-format on
118
119 struct IRenderDeviceVkVtbl
120 {
121 struct IObjectMethods Object;
122 struct IRenderDeviceMethods RenderDevice;
123 struct IRenderDeviceVkMethods RenderDeviceVk;
124 };
125
126121 // clang-format off
127122
128123 # define IRenderDeviceVk_GetVkDevice(This) CALL_IFACE_METHOD(RenderDeviceVk, GetVkDevice, This)
4040 #define DILIGENT_INTERFACE_NAME ISamplerVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ISamplerVkInclusiveMethods \
44 ISamplerInclusiveMethods; \
45 ISamplerVkMethods SamplerVk
46
4347 /// Exposes Vulkan-specific functionality of a sampler object.
4448 DILIGENT_BEGIN_INTERFACE(ISamplerVk, ISampler)
4549 {
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct ISamplerVkVtbl
56 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 //struct ISamplerMethods Sampler;
60 struct ISamplerVkMethods SamplerVk;
61 };
62
6359 # define ISamplerVk_GetVkSampler(This) CALL_IFACE_METHOD(SamplerVk, GetVkSampler, This)
6460
6561 #endif
4040 #define DILIGENT_INTERFACE_NAME IShaderResourceBindingVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define IShaderResourceBindingVkInclusiveMethods \
44 IShaderResourceBindingInclusiveMethods
45 //IShaderResourceBindingVkMethods ShaderResourceBindingVk
46
4347 #if DILIGENT_CPP_INTERFACE
4448
4549 /// Exposes Vulkan-specific functionality of a shader resource binding object.
5256
5357 #if DILIGENT_C_INTERFACE
5458
55 struct IShaderResourceBindingVkVtbl
59 typedef struct IShaderResourceBindingVkVtbl
5660 {
57 struct IObjectMethods Object;
58 struct IDeviceObjectMethods DeviceObject;
59 struct IShaderResourceBindingMethods ShaderResourceBinding;
60 //struct IShaderResourceBindingVkMethods ShaderResourceBindingVk;
61 };
61 IShaderResourceBindingVkInclusiveMethods;
62 } IShaderResourceBindingVkVtbl;
6263
6364 #endif
6465
4242 static const INTERFACE_ID IID_ShaderVk =
4343 {0x8b0c91b4, 0xb1d8, 0x4e03, {0x92, 0x50, 0xa7, 0xe, 0x13, 0x1a, 0x59, 0xfa}};
4444
45 #define IShaderVkInclusiveMethods \
46 IShaderInclusiveMethods; \
47 IShaderVkMethods ShaderVk
48
4549 #if DILIGENT_CPP_INTERFACE
4650
4751 /// Exposes Vulkan-specific functionality of a shader object.
4343 #define DILIGENT_INTERFACE_NAME ISwapChainVk
4444 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4545
46 #define ISwapChainVkInclusiveMethods \
47 ISwapChainInclusiveMethods; \
48 ISwapChainVkMethods SwapChainVk
49
4650 /// Exposes Vulkan-specific functionality of a swap chain.
4751 DILIGENT_BEGIN_INTERFACE(ISwapChainVk, ISwapChain)
4852 {
5559
5660 #if DILIGENT_C_INTERFACE
5761
58 struct ISwapChainVkVtbl
59 {
60 struct IObjectMethods Object;
61 struct IDeviceObjectMethods DeviceObject;
62 struct ISwapChainMethods SwapChain;
63 struct ISwapChainVkMethods SwapChainVk;
64 };
65
6662 // clang-format off
6763
6864 # define ISwapChainVk_GetVkSwapChain(This) CALL_IFACE_METHOD(SwapChainVk, GetVkSwapChain, This)
4040 #define DILIGENT_INTERFACE_NAME ITextureViewVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ITextureViewVkInclusiveMethods \
44 ITextureViewInclusiveMethods; \
45 ITextureViewVkMethods TextureViewVk
46
4347 // clang-format off
4448
4549 /// Exposes Vulkan-specific functionality of a texture view object.
5458
5559 #if DILIGENT_C_INTERFACE
5660
57 // clang-format on
58
59 struct ITextureViewVkVtbl
60 {
61 struct IObjectMethods Object;
62 struct IDeviceObjectMethods DeviceObject;
63 struct ITextureViewMethods TextureView;
64 struct ITextureViewVkMethods TextureViewVk;
65 };
66
6761 // clang-format off
6862
6963 # define ITextureViewVk_GetVulkanImageView(This) CALL_IFACE_METHOD(TextureViewVk, GetVulkanImageView, This)
4040 #define DILIGENT_INTERFACE_NAME ITextureVk
4141 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4242
43 #define ITextureVkInclusiveMethods \
44 ITextureInclusiveMethods; \
45 ITextureVkMethods TextureVk
46
4347 // clang-format off
4448
4549 /// Exposes Vulkan-specific functionality of a texture object.
6771
6872 #if DILIGENT_C_INTERFACE
6973
70 // clang-format on
71
72 struct ITextureVkVtbl
73 {
74 struct IObjectMethods Object;
75 struct IDeviceObjectMethods DeviceObject;
76 struct ITextureMethods Texture;
77 struct ITextureVkMethods TextureVk;
78 };
79
8074 // clang-format off
8175
8276 # define ITextureVk_GetVkImage(This) CALL_IFACE_METHOD(TextureVk, GetVkImage,This)
4242 #define DILIGENT_INTERFACE_NAME IHLSL2GLSLConversionStream
4343 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
4444
45 #define IHLSL2GLSLConversionStreamInclusiveMethods \
46 IObjectInclusiveMethods; \
47 IHLSL2GLSLConversionStreamMethods HLSL2GLSLConversionStream
48
4549 // clang-format off
4650
4751 DILIGENT_BEGIN_INTERFACE(IHLSL2GLSLConversionStream, IObject)
6064
6165 #if DILIGENT_C_INTERFACE
6266
63 // clang-format on
64
65 struct IHLSL2GLSLConversionStreamVtbl
66 {
67 struct IObjectMethods Object;
68 struct IHLSL2GLSLConversionStreamMethods HLSL2GLSLConversionStream;
69 };
70
7167 // clang-format off
7268
7369 # define IHLSL2GLSLConversionStream_Convert(This, ...) CALL_IFACE_METHOD(HLSL2GLSLConversionStream, Convert, This, __VA_ARGS__)
8379
8480 #define DILIGENT_INTERFACE_NAME IHLSL2GLSLConverter
8581 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
82
83 #define IHLSL2GLSLConverterInclusiveMethods \
84 IObjectInclusiveMethods; \
85 IHLSL2GLSLConverterMethods HLSL2GLSLConverter
8686
8787 // clang-format off
8888
102102
103103 #if DILIGENT_C_INTERFACE
104104
105 // clang-format on
106
107 struct IHLSL2GLSLConverterVtbl
108 {
109 struct IObjectMethods Object;
110 struct IHLSL2GLSLConverterMethods HLSL2GLSLConverter;
111 };
112
113105 // clang-format off
114106
115107 # define IHLSL2GLSLConverter_CreateStream(This, ...) CALL_IFACE_METHOD(HLSL2GLSLConverter, CreateStream, This, __VA_ARGS__)
5454
5555 # define DILIGENT_GLOBAL_FUNCTION(FuncName) Diligent_##FuncName
5656
57 # define DILIGENT_BEGIN_INTERFACE(Name, Base) \
58 struct Name; \
59 struct Name##Methods
57 # define DILIGENT_BEGIN_INTERFACE(Iface, Base) \
58 typedef struct Iface \
59 { \
60 struct Iface##Vtbl* pVtbl; \
61 } Iface; \
62 struct Iface##Methods
6063
6164 # define DEFAULT_VALUE(x)
6265
6366 # define CALL_IFACE_METHOD(Iface, Method, This, ...) (This)->pVtbl->Iface.Method((I##Iface*)(This), ##__VA_ARGS__)
6467
6568 // Two levels of indirection are required to concatenate expanded macros
66 # define DILIGENT_CONCATENATE(X, Y) X##Y
67 # define DILIGENT_VTBL_NAME(Iface) DILIGENT_CONCATENATE(Iface, Vtbl)
69 # define DILIGENT_CONCATENATE0(X, Y) X##Y
70 # define DILIGENT_CONCATENATE(X, Y) DILIGENT_CONCATENATE0(X, Y)
6871
6972 #else
7073
4343 #define DILIGENT_INTERFACE_NAME IDataBlob
4444 #include "DefineInterfaceHelperMacros.h"
4545
46
46 #define IDataBlobInclusiveMethods \
47 IObjectInclusiveMethods; \
48 IDataBlobMethods DataBlob
4749
4850 /// Base interface for a file stream
4951 DILIGENT_BEGIN_INTERFACE(IDataBlob, IObject)
6466
6567 #if DILIGENT_C_INTERFACE
6668
67
68 // clang-format on
69
70 struct IDataBlobVtbl
71 {
72 struct IObjectMethods Object;
73 struct IDataBlobMethods DataBlob;
74 };
75
7669 // clang-format off
7770
7871 # define IDataBlob_Resize(This, ...) CALL_IFACE_METHOD(DataBlob, Resize, This, __VA_ARGS__)
5656 # define REF *
5757 # define METHOD(Name) (*Name)
5858
59 // Suppose that DILIGENT_INTERFACE_NAME == Iface, then DILIGENT_END_INTERFACE macro below will expand to the following:
60 //
61 // typedef struct IfaceMethods IfaceMethods;
62 // typedef struct IfaceVtbl
63 // {
64 // IfaceInclusiveMethods;
65 // } IfaceVtbl;
66 //
67 // IfaceInclusiveMethods macro must be properly defined
68
5969 // clang-format off
6070 # define DILIGENT_END_INTERFACE\
61 typedef struct DILIGENT_INTERFACE_NAME \
62 { \
63 struct DILIGENT_VTBL_NAME(DILIGENT_INTERFACE_NAME)* pVtbl;\
64 } DILIGENT_INTERFACE_NAME;
71 typedef struct DILIGENT_CONCATENATE(DILIGENT_INTERFACE_NAME, Methods) DILIGENT_CONCATENATE(DILIGENT_INTERFACE_NAME, Methods); \
72 typedef struct DILIGENT_CONCATENATE(DILIGENT_INTERFACE_NAME, Vtbl) \
73 { \
74 DILIGENT_CONCATENATE(DILIGENT_INTERFACE_NAME, InclusiveMethods);\
75 } DILIGENT_CONCATENATE(DILIGENT_INTERFACE_NAME, Vtbl);
6576 // clang-format on
6677
6778 #else
4444 #define DILIGENT_INTERFACE_NAME IFileStream
4545 #include "DefineInterfaceHelperMacros.h"
4646
47 #define IFileStreamInclusiveMethods \
48 IObjectInclusiveMethods; \
49 IFileStreamMethods FileStream
4750
4851 /// Base interface for a file stream
4952 DILIGENT_BEGIN_INTERFACE(IFileStream, IObject)
6972
7073 #include "UndefInterfaceHelperMacros.h"
7174
72
7375 #if DILIGENT_C_INTERFACE
74
75
76 // clang-format on
77
78 struct IFileStreamVtbl
79 {
80 struct IObjectMethods Object;
81 struct IFileStreamMethods FileStream;
82 };
8376
8477 // clang-format off
8578
8484
8585 // clang-format off
8686
87 struct IObjectMethods
87 typedef struct IObjectMethods
8888 {
8989 void (*QueryInterface) (struct IObject*, const struct INTERFACE_ID* IID, struct IObject** ppInterface);
9090 ReferenceCounterValueType (*AddRef) (struct IObject*);
9191 ReferenceCounterValueType (*Release) (struct IObject*);
9292 struct IReferenceCounters* (*GetReferenceCounters)(struct IObject*);
93 };
93 } IObjectMethods;
9494
95 struct IObjectVtbl
95 #define IObjectInclusiveMethods IObjectMethods Object
96
97 typedef struct IObjectVtbl
9698 {
97 struct IObjectMethods Object;
98 };
99 IObjectInclusiveMethods;
100 } IObjectVtbl;
99101
100102 // clang-format on
101103