Reworked C interface to optimize inheritance handling
assiduous
3 years ago
175 | 175 | #define DILIGENT_INTERFACE_NAME IBuffer |
176 | 176 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
177 | 177 | |
178 | #define IBufferInclusiveMethods \ | |
179 | IDeviceObjectInclusiveMethods; \ | |
180 | IBufferMethods Buffer | |
178 | 181 | |
179 | 182 | /// Buffer interface |
180 | 183 | |
240 | 243 | |
241 | 244 | #if DILIGENT_C_INTERFACE |
242 | 245 | |
243 | // clang-format on | |
244 | ||
245 | struct IBufferVtbl | |
246 | { | |
247 | struct IObjectMethods Object; | |
248 | struct IDeviceObjectMethods DeviceObject; | |
249 | struct IBufferMethods Buffer; | |
250 | }; | |
251 | ||
252 | 246 | // clang-format off |
253 | 247 | |
254 | 248 | # define IBuffer_GetDesc(This) (const struct BufferDesc*)IDeviceObject_GetDesc(This) |
141 | 141 | #define DILIGENT_INTERFACE_NAME IBufferView |
142 | 142 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
143 | 143 | |
144 | #define IBufferViewInclusiveMethods \ | |
145 | IDeviceObjectInclusiveMethods; \ | |
146 | IBufferViewMethods BufferView | |
147 | ||
144 | 148 | /// Buffer view interface |
145 | 149 | |
146 | 150 | /// To create a buffer view, call IBuffer::CreateView(). |
166 | 170 | |
167 | 171 | #if DILIGENT_C_INTERFACE |
168 | 172 | |
169 | // clang-format on | |
170 | ||
171 | struct IBufferViewVtbl | |
172 | { | |
173 | struct IObjectMethods Object; | |
174 | struct IDeviceObjectMethods DeviceObject; | |
175 | struct IBufferViewMethods BufferView; | |
176 | }; | |
177 | ||
178 | 173 | // clang-format off |
179 | 174 | |
180 | 175 | # define IBufferView_GetDesc(This) (const struct BufferViewDesc*)IDeviceObject_GetDesc(This) |
611 | 611 | #define DILIGENT_INTERFACE_NAME IDeviceContext |
612 | 612 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
613 | 613 | |
614 | #define IDeviceContextInclusiveMethods \ | |
615 | IObjectInclusiveMethods; \ | |
616 | IDeviceContextMethods DeviceContext | |
617 | ||
614 | 618 | /// Device context interface. |
615 | 619 | |
616 | 620 | /// \remarks Device context keeps strong references to all objects currently bound to |
1317 | 1321 | #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" |
1318 | 1322 | |
1319 | 1323 | #if DILIGENT_C_INTERFACE |
1320 | ||
1321 | // clang-format on | |
1322 | ||
1323 | struct IDeviceContextVtbl | |
1324 | { | |
1325 | struct IObjectMethods Object; | |
1326 | struct IDeviceContextMethods DeviceContext; | |
1327 | }; | |
1328 | 1324 | |
1329 | 1325 | // clang-format off |
1330 | 1326 |
41 | 41 | |
42 | 42 | #define DILIGENT_INTERFACE_NAME IDeviceObject |
43 | 43 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
44 | #define IDeviceObjectInclusiveMethods \ | |
45 | IObjectInclusiveMethods; \ | |
46 | IDeviceObjectMethods DeviceObject | |
44 | 47 | |
45 | 48 | /// Base interface for all objects created by the render device Diligent::IRenderDevice |
46 | 49 | DILIGENT_BEGIN_INTERFACE(IDeviceObject, IObject) |
75 | 78 | |
76 | 79 | // clang-format off |
77 | 80 | |
78 | struct IDeviceObjectVtbl | |
79 | { | |
80 | struct IObjectMethods Object; | |
81 | struct IDeviceObjectMethods DeviceObject; | |
82 | }; | |
83 | ||
84 | // clang-format off | |
85 | ||
86 | 81 | # define IDeviceObject_GetDesc(This) CALL_IFACE_METHOD(DeviceObject, GetDesc, This) |
87 | 82 | # define IDeviceObject_GetUniqueID(This) CALL_IFACE_METHOD(DeviceObject, GetUniqueID, This) |
88 | 83 |
43 | 43 | #define DILIGENT_INTERFACE_NAME IEngineFactory |
44 | 44 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
45 | 45 | |
46 | #define IEngineFactoryInclusiveMethods \ | |
47 | IObjectInclusiveMethods; \ | |
48 | IEngineFactoryMethods EngineFactory | |
46 | 49 | |
47 | 50 | // clang-format off |
48 | 51 | |
76 | 79 | |
77 | 80 | #if DILIGENT_C_INTERFACE |
78 | 81 | |
79 | // clang-format on | |
80 | ||
81 | struct IEngineFactoryVtbl | |
82 | { | |
83 | struct IObjectMethods Object; | |
84 | struct IEngineFactoryMethods EngineFactory; | |
85 | }; | |
86 | ||
87 | 82 | // clang-format off |
88 | 83 | |
89 | 84 | # define IEngineFactory_GetAPIInfo(This) CALL_IFACE_METHOD(EngineFactory, GetAPIInfo, This) |
48 | 48 | #define DILIGENT_INTERFACE_NAME IFence |
49 | 49 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
50 | 50 | |
51 | #define IFenceInclusiveMethods \ | |
52 | IDeviceObjectInclusiveMethods; \ | |
53 | IFenceMethods Fence | |
51 | 54 | |
52 | 55 | /// Fence interface |
53 | 56 | |
79 | 82 | |
80 | 83 | #if DILIGENT_C_INTERFACE |
81 | 84 | |
82 | // clang-format on | |
83 | ||
84 | struct IFenceVtbl | |
85 | { | |
86 | struct IObjectMethods Object; | |
87 | struct IDeviceObjectMethods DeviceObject; | |
88 | struct IFenceMethods Fence; | |
89 | }; | |
90 | ||
91 | 85 | // clang-format off |
92 | 86 | |
93 | 87 | # define IFence_GetDesc(This) (const struct FenceDesc*)IDeviceObject_GetDesc(This) |
256 | 256 | #define DILIGENT_INTERFACE_NAME IPipelineState |
257 | 257 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
258 | 258 | |
259 | #define IPipelineStateInclusiveMethods \ | |
260 | IDeviceObjectInclusiveMethods; \ | |
261 | IPipelineStateMethods PipelineState | |
262 | ||
259 | 263 | // clang-format off |
260 | 264 | |
261 | 265 | /// Pipeline state interface |
351 | 355 | |
352 | 356 | #if DILIGENT_C_INTERFACE |
353 | 357 | |
354 | // clang-format on | |
355 | ||
356 | struct IPipelineStateVtbl | |
357 | { | |
358 | struct IObjectMethods Object; | |
359 | struct IDeviceObjectMethods DeviceObject; | |
360 | struct IPipelineStateMethods PipelineState; | |
361 | }; | |
362 | ||
363 | 358 | // clang-format off |
364 | 359 | |
365 | 360 | # define IPipelineState_GetDesc(This) (const struct PipelineStateDesc*)IDeviceObject_GetDesc(This) |
174 | 174 | #define DILIGENT_INTERFACE_NAME IQuery |
175 | 175 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
176 | 176 | |
177 | #define IQueryInclusiveMethods \ | |
178 | IDeviceObjectInclusiveMethods; \ | |
179 | IQueryMethods Query | |
177 | 180 | |
178 | 181 | // clang-format off |
179 | 182 | |
221 | 224 | |
222 | 225 | #if DILIGENT_C_INTERFACE |
223 | 226 | |
224 | // clang-format on | |
225 | ||
226 | struct IQueryVtbl | |
227 | { | |
228 | struct IObjectMethods Object; | |
229 | struct IDeviceObjectMethods DeviceObject; | |
230 | struct IQueryMethods Query; | |
231 | }; | |
232 | ||
233 | 227 | // clang-format off |
234 | 228 | |
235 | 229 | # define IQuery_GetDesc(This) (const struct QueryDesc*)IDeviceObject_GetDesc(This) |
59 | 59 | #define DILIGENT_INTERFACE_NAME IRenderDevice |
60 | 60 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
61 | 61 | |
62 | #define IRenderDeviceInclusiveMethods \ | |
63 | IObjectInclusiveMethods; \ | |
64 | IRenderDeviceMethods RenderDevice | |
62 | 65 | |
63 | 66 | // clang-format off |
64 | 67 | |
241 | 244 | |
242 | 245 | #if DILIGENT_C_INTERFACE |
243 | 246 | |
244 | // clang-format on | |
245 | ||
246 | struct IRenderDeviceVtbl | |
247 | { | |
248 | struct IObjectMethods Object; | |
249 | struct IRenderDeviceMethods RenderDevice; | |
250 | }; | |
251 | ||
252 | 247 | // clang-format off |
253 | 248 | |
254 | 249 | # define IRenderDevice_CreateBuffer(This, ...) CALL_IFACE_METHOD(RenderDevice, CreateBuffer, This, __VA_ARGS__) |
92 | 92 | #define DILIGENT_INTERFACE_NAME IResourceMapping |
93 | 93 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
94 | 94 | |
95 | #define IResourceMappingInclusiveMethods \ | |
96 | IObjectInclusiveMethods; \ | |
97 | IResourceMappingMethods ResourceMapping | |
95 | 98 | |
96 | 99 | // clang-format off |
97 | 100 | |
169 | 172 | |
170 | 173 | #if DILIGENT_C_INTERFACE |
171 | 174 | |
172 | // clang-format on | |
173 | ||
174 | struct IResourceMappingVtbl | |
175 | { | |
176 | struct IObjectMethods Object; | |
177 | struct IResourceMappingMethods ResourceMapping; | |
178 | }; | |
179 | ||
180 | 175 | // clang-format off |
181 | 176 | |
182 | 177 | # define IResourceMapping_AddResource(This, ...) CALL_IFACE_METHOD(ResourceMapping, AddResource, This, __VA_ARGS__) |
173 | 173 | #define DILIGENT_INTERFACE_NAME ISampler |
174 | 174 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
175 | 175 | |
176 | // clang-format off | |
177 | #define ISamplerInclusiveMethods \ | |
178 | IDeviceObjectInclusiveMethods \ | |
179 | /*ISamplerMethods Sampler*/ | |
180 | // clang-format on | |
181 | ||
176 | 182 | #if DILIGENT_CPP_INTERFACE |
177 | 183 | |
178 | 184 | // clang-format off |
198 | 204 | |
199 | 205 | #if DILIGENT_C_INTERFACE |
200 | 206 | |
201 | // clang-format on | |
202 | ||
203 | struct ISampler; | |
204 | ||
205 | //struct ISamplerMethods | |
206 | //{ | |
207 | //}; | |
208 | ||
209 | struct ISamplerVtbl | |
207 | typedef struct ISamplerVtbl | |
210 | 208 | { |
211 | struct IObjectMethods Object; | |
212 | struct IDeviceObjectMethods DeviceObject; | |
213 | //struct ISamplerMethods Sampler; | |
214 | }; | |
209 | ISamplerInclusiveMethods; | |
210 | } ISamplerVtbl; | |
215 | 211 | |
216 | 212 | typedef struct ISampler |
217 | 213 | { |
87 | 87 | #define DILIGENT_INTERFACE_NAME IShaderSourceInputStreamFactory |
88 | 88 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
89 | 89 | |
90 | #define IShaderSourceInputStreamFactoryInclusiveMethods \ | |
91 | IObjectInclusiveMethods; \ | |
92 | IShaderSourceInputStreamFactoryMethods ShaderSourceInputStreamFactory | |
90 | 93 | |
91 | 94 | /// Shader source stream factory interface |
92 | 95 | DILIGENT_BEGIN_INTERFACE(IShaderSourceInputStreamFactory, IObject) |
102 | 105 | #if DILIGENT_C_INTERFACE |
103 | 106 | |
104 | 107 | // clang-format on |
105 | ||
106 | struct IShaderSourceInputStreamFactoryVtbl | |
107 | { | |
108 | struct IObjectMethods Object; | |
109 | struct IShaderSourceInputStreamFactoryMethods ShaderSourceInputStreamFactory; | |
110 | }; | |
111 | 108 | |
112 | 109 | # define IShaderSourceInputStreamFactory_CreateInputStream(This, ...) CALL_IFACE_METHOD(ShaderSourceInputStreamFactory, CreateInputStream, This, __VA_ARGS__) |
113 | 110 | |
313 | 310 | #define DILIGENT_INTERFACE_NAME IShader |
314 | 311 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
315 | 312 | |
313 | #define IShaderInclusiveMethods \ | |
314 | IDeviceObjectInclusiveMethods; \ | |
315 | IShaderMethods Shader | |
316 | ||
316 | 317 | // clang-format off |
317 | 318 | |
318 | 319 | /// Shader interface |
337 | 338 | |
338 | 339 | #if DILIGENT_C_INTERFACE |
339 | 340 | |
340 | // clang-format on | |
341 | ||
342 | struct IShaderVtbl | |
343 | { | |
344 | struct IObjectMethods Object; | |
345 | struct IDeviceObjectMethods DeviceObject; | |
346 | struct IShaderMethods Shader; | |
347 | }; | |
348 | ||
349 | 341 | // clang-format off |
350 | 342 | |
351 | 343 | # define IShader_GetDesc(This) (const struct ShaderDesc*)IDeviceObject_GetDesc(This) |
46 | 46 | #define DILIGENT_INTERFACE_NAME IShaderResourceBinding |
47 | 47 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
48 | 48 | |
49 | ||
49 | #define IShaderResourceBindingInclusiveMethods \ | |
50 | IObjectInclusiveMethods; \ | |
51 | IShaderResourceBindingMethods ShaderResourceBinding | |
50 | 52 | |
51 | 53 | // clang-format off |
52 | 54 | |
132 | 134 | |
133 | 135 | #if DILIGENT_C_INTERFACE |
134 | 136 | |
135 | // clang-format on | |
136 | ||
137 | struct IShaderResourceBindingVtbl | |
138 | { | |
139 | struct IObjectMethods Object; | |
140 | struct IShaderResourceBindingMethods ShaderResourceBinding; | |
141 | }; | |
142 | ||
143 | 137 | // clang-format off |
144 | 138 | |
145 | 139 | # define IShaderResourceBinding_GetPipelineState(This) CALL_IFACE_METHOD(ShaderResourceBinding, GetPipelineState, This) |
106 | 106 | #define DILIGENT_INTERFACE_NAME IShaderResourceVariable |
107 | 107 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
108 | 108 | |
109 | ||
109 | #define IShaderResourceVariableInclusiveMethods \ | |
110 | IObjectInclusiveMethods; \ | |
111 | IShaderResourceVariableMethods ShaderResourceVariable | |
110 | 112 | |
111 | 113 | // clang-format off |
112 | 114 | |
158 | 160 | |
159 | 161 | #if DILIGENT_C_INTERFACE |
160 | 162 | |
161 | // clang-format on | |
162 | ||
163 | struct IShaderResourceVariableVtbl | |
164 | { | |
165 | struct IObjectMethods Object; | |
166 | struct IShaderResourceVariableMethods ShaderResourceVariable; | |
167 | }; | |
168 | ||
169 | 163 | // clang-format off |
170 | 164 | |
171 | 165 | # define IShaderResourceVariable_Set(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, Set, This, __VA_ARGS__) |
43 | 43 | #define DILIGENT_INTERFACE_NAME ISwapChain |
44 | 44 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
45 | 45 | |
46 | #define ISwapChainInclusiveMethods \ | |
47 | IObjectInclusiveMethods; \ | |
48 | ISwapChainMethods SwapChain | |
46 | 49 | |
47 | 50 | // clang-format off |
48 | 51 | |
99 | 102 | |
100 | 103 | #if DILIGENT_C_INTERFACE |
101 | 104 | |
102 | // clang-format on | |
103 | ||
104 | struct ISwapChainVtbl | |
105 | { | |
106 | struct IObjectMethods Object; | |
107 | struct ISwapChainMethods SwapChain; | |
108 | }; | |
109 | ||
110 | 105 | // clang-format off |
111 | 106 | |
112 | 107 | # define ISwapChain_Present(This, ...) CALL_IFACE_METHOD(SwapChain, Present, This, __VA_ARGS__) |
310 | 310 | #define DILIGENT_INTERFACE_NAME ITexture |
311 | 311 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
312 | 312 | |
313 | ||
313 | #define ITextureInclusiveMethods \ | |
314 | IDeviceObjectInclusiveMethods; \ | |
315 | ITextureMethods Texture | |
314 | 316 | |
315 | 317 | /// Texture inteface |
316 | 318 | DILIGENT_BEGIN_INTERFACE(ITexture, IDeviceObject) |
380 | 382 | |
381 | 383 | #if DILIGENT_C_INTERFACE |
382 | 384 | |
383 | // clang-format on | |
384 | ||
385 | struct ITextureVtbl | |
386 | { | |
387 | struct IObjectMethods Object; | |
388 | struct IDeviceObjectMethods DeviceObject; | |
389 | struct ITextureMethods Texture; | |
390 | }; | |
391 | ||
392 | 385 | // clang-format off |
393 | 386 | |
394 | 387 | # define ITexture_GetDesc(This) (const struct TextureDesc*)IDeviceObject_GetDesc(This) |
186 | 186 | #define DILIGENT_INTERFACE_NAME ITextureView |
187 | 187 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
188 | 188 | |
189 | ||
189 | #define ITextureViewInclusiveMethods \ | |
190 | IDeviceObjectInclusiveMethods; \ | |
191 | ITextureViewMethods TextureView | |
190 | 192 | |
191 | 193 | /// Texture view interface |
192 | 194 | |
228 | 230 | |
229 | 231 | #if DILIGENT_C_INTERFACE |
230 | 232 | |
231 | // clang-format on | |
232 | ||
233 | struct ITextureViewVtbl | |
234 | { | |
235 | struct IObjectMethods Object; | |
236 | struct IDeviceObjectMethods DeviceObject; | |
237 | struct ITextureViewMethods TextureView; | |
238 | }; | |
239 | ||
240 | 233 | # define ITextureView_GetDesc(This) (const struct TextureViewDesc*)IDeviceObject_GetDesc(This) |
241 | 234 | |
242 | 235 | // clang-format off |
40 | 40 | #define DILIGENT_INTERFACE_NAME IBufferD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IBufferD3D11InclusiveMethods \ | |
44 | IBufferInclusiveMethods; \ | |
45 | IBufferD3D11Methods BufferD3D11 | |
46 | ||
43 | 47 | /// Exposes Direct3D11-specific functionality of a buffer object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IBufferD3D11, IBuffer) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct IBufferD3D11Vtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceObjectMethods DeviceObject; | |
62 | struct IBufferMethods Buffer; | |
63 | struct IBufferD3D11Methods BufferD3D11; | |
64 | }; | |
65 | ||
66 | 62 | # define IBufferD3D11_GetD3D11Buffer(This) CALL_IFACE_METHOD(BufferD3D11, GetD3D11Buffer, This) |
67 | 63 | |
68 | 64 | #endif |
40 | 40 | #define DILIGENT_INTERFACE_NAME IBufferViewD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IBufferViewD3D11InclusiveMethods \ | |
44 | IBufferViewInclusiveMethods; \ | |
45 | IBufferViewD3D11Methods BufferViewD3D11 | |
46 | ||
43 | 47 | /// Exposes Direct3D11-specific functionality of a buffer view object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IBufferViewD3D11, IBufferView) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct IBufferViewD3D11Vtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceObjectMethods DeviceObject; | |
62 | struct IBufferViewMethods BufferView; | |
63 | struct IBufferViewD3D11Methods BufferViewD3D11; | |
64 | }; | |
65 | ||
66 | 62 | # define IBufferViewD3D11_GetD3D11View(This) CALL_IFACE_METHOD(BufferViewD3D11, GetD3D11View, This) |
67 | 63 | |
68 | 64 | #endif |
40 | 40 | #define DILIGENT_INTERFACE_NAME IDeviceContextD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IDeviceContextD3D11InclusiveMethods \ | |
44 | IDeviceContextInclusiveMethods; \ | |
45 | IDeviceContextD3D11Methods DeviceContextD3D11 | |
46 | ||
43 | 47 | /// Exposes Direct3D11-specific functionality of a device context. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IDeviceContextD3D11, IDeviceContext) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct IDeviceContextD3D11Vtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceContextMethods DeviceContext; | |
62 | struct IDeviceContextD3D11Methods DeviceContextD3D11; | |
63 | }; | |
64 | ||
65 | 62 | # define IDeviceContextD3D11_GetD3D11DeviceContext(This) CALL_IFACE_METHOD(DeviceContextD3D11, GetD3D11DeviceContext, This) |
66 | 63 | |
67 | 64 | #endif |
46 | 46 | |
47 | 47 | #define DILIGENT_INTERFACE_NAME IEngineFactoryD3D11 |
48 | 48 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
49 | ||
50 | #define IEngineFactoryD3D11InclusiveMethods \ | |
51 | IEngineFactoryInclusiveMethods; \ | |
52 | IEngineFactoryD3D11Methods EngineFactoryD3D11 | |
49 | 53 | |
50 | 54 | // clang-format off |
51 | 55 | |
154 | 158 | |
155 | 159 | #if DILIGENT_C_INTERFACE |
156 | 160 | |
157 | // clang-format on | |
158 | ||
159 | struct IEngineFactoryD3D11Vtbl | |
160 | { | |
161 | struct IObjectMethods Object; | |
162 | struct IEngineFactoryMethods EngineFactory; | |
163 | struct IEngineFactoryD3D11Methods EngineFactoryD3D11; | |
164 | }; | |
165 | ||
166 | 161 | // clang-format off |
167 | 162 | |
168 | 163 | # define IEngineFactoryD3D11_CreateDeviceAndContextsD3D11(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, CreateDeviceAndContextsD3D11, This, __VA_ARGS__) |
40 | 40 | #define DILIGENT_INTERFACE_NAME IFenceD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | // clang-format off | |
44 | #define IFenceD3D11InclusiveMethods \ | |
45 | IFenceInclusiveMethods \ | |
46 | /*IFenceD3D11Methods FenceD3D11*/ | |
47 | // clang-format on | |
48 | ||
43 | 49 | #if DILIGENT_CPP_INTERFACE |
44 | 50 | |
45 | 51 | /// Exposes Direct3D11-specific functionality of a fence object. |
55 | 61 | |
56 | 62 | struct IFenceD3D11Vtbl |
57 | 63 | { |
58 | struct IObjectMethods Object; | |
59 | struct IDeviceObjectMethods DeviceObject; | |
60 | struct IFenceMethods Fence; | |
61 | //struct IFenceD3D11Methods FenceD3D11; | |
64 | IFenceD3D11InclusiveMethods; | |
62 | 65 | }; |
63 | 66 | |
64 | 67 | typedef struct IFenceD3D11 |
39 | 39 | |
40 | 40 | #define DILIGENT_INTERFACE_NAME IPipelineStateD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | ||
43 | #define IPipelineStateD3D11InclusiveMethods \ | |
44 | IPipelineStateInclusiveMethods; \ | |
45 | IPipelineStateD3D11Methods PipelineStateD3D11 | |
42 | 46 | |
43 | 47 | /// Exposes Direct3D11-specific functionality of a pipeline state object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IPipelineStateD3D11, IPipelineState) |
112 | 116 | |
113 | 117 | #if DILIGENT_C_INTERFACE |
114 | 118 | |
115 | struct IPipelineStateD3D11Vtbl | |
116 | { | |
117 | struct IObjectMethods Object; | |
118 | struct IDeviceObjectMethods DeviceObject; | |
119 | struct IPipelineStateMethods PipelineState; | |
120 | struct IPipelineStateD3D11Methods PipelineStateD3D11; | |
121 | }; | |
122 | ||
123 | 119 | // clang-format off |
124 | 120 | |
125 | 121 | # define IPipelineStateD3D11_GetD3D11BlendState(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11BlendState, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME IQueryD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IQueryD3D11InclusiveMethods \ | |
44 | IQueryInclusiveMethods; \ | |
45 | IQueryD3D11Methods QueryD3D11 | |
46 | ||
43 | 47 | /// Exposes Direct3D11-specific functionality of a Query object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IQueryD3D11, IQuery) |
45 | 49 | { |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct IQueryD3D11Vtbl | |
56 | { | |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IQueryMethods Query; | |
60 | struct IQueryD3D11Methods QueryD3D11; | |
61 | }; | |
62 | ||
63 | 59 | # define IQueryD3D11_GetD3D11Query(This) CALL_IFACE_METHOD(QueryD3D11, GetD3D11Query, This) |
64 | 60 | |
65 | 61 | #endif |
39 | 39 | |
40 | 40 | #define DILIGENT_INTERFACE_NAME IRenderDeviceD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | ||
43 | #define IRenderDeviceD3D11InclusiveMethods \ | |
44 | IRenderDeviceInclusiveMethods; \ | |
45 | IRenderDeviceD3D11Methods RenderDeviceD3D11 | |
42 | 46 | |
43 | 47 | // clang-format off |
44 | 48 | |
114 | 118 | |
115 | 119 | #if DILIGENT_C_INTERFACE |
116 | 120 | |
117 | // clang-format on | |
118 | ||
119 | struct IRenderDeviceD3D11Vtbl | |
120 | { | |
121 | struct IObjectMethods Object; | |
122 | struct IRenderDeviceMethods RenderDevice; | |
123 | struct IRenderDeviceD3D11Methods RenderDeviceD3D11; | |
124 | }; | |
125 | ||
126 | 121 | // clang-format off |
127 | 122 | |
128 | 123 | # define IRenderDeviceD3D11_GetD3D11Device(This) CALL_IFACE_METHOD(RenderDeviceD3D11, GetD3D11Device, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ISamplerD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ISamplerD3D11InclusiveMethods \ | |
44 | ISamplerInclusiveMethods; \ | |
45 | ISamplerD3D11Methods SamplerD3D11 | |
46 | ||
43 | 47 | /// Exposes Direct3D11-specific functionality of a sampler object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(ISamplerD3D11, ISampler) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct ISamplerD3D11Vtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceObjectMethods DeviceObject; | |
62 | //struct ISamplerMethods Sampler; | |
63 | struct ISamplerD3D11Methods SamplerD3D11; | |
64 | }; | |
65 | ||
66 | 62 | # define ISamplerD3D11_GetD3D11SamplerState(This) CALL_IFACE_METHOD(SamplerD3D11, GetD3D11SamplerState, This) |
67 | 63 | |
68 | 64 | #endif |
40 | 40 | #define DILIGENT_INTERFACE_NAME IShaderD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IShaderD3D11InclusiveMethods \ | |
44 | IShaderD3DInclusiveMethods; \ | |
45 | IShaderD3D11Methods ShaderD3D11 | |
46 | ||
43 | 47 | /// Exposes Direct3D11-specific functionality of a shader object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IShaderD3D11, IShaderD3D) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
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 | ||
67 | 62 | # define IShaderD3D11_GetD3D11Shader(This) CALL_IFACE_METHOD(ShaderD3D11, GetD3D11Shader, This) |
68 | 63 | |
69 | 64 | #endif |
40 | 40 | #define DILIGENT_INTERFACE_NAME IShaderResourceBindingD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | // clang-format off | |
44 | #define IShaderResourceBindingD3D11InclusiveMethods \ | |
45 | IShaderResourceBindingInclusiveMethods \ | |
46 | /*IShaderResourceBindingD3D11Methods ShaderResourceBindingD3D11*/ | |
47 | // clang-format on | |
48 | ||
43 | 49 | #if DILIGENT_CPP_INTERFACE |
44 | 50 | |
45 | 51 | /// Exposes Direct3D11-specific functionality of a shader resource binding object. |
54 | 60 | |
55 | 61 | struct IShaderResourceBindingD3D11Vtbl |
56 | 62 | { |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IShaderResourceBindingMethods ShaderResourceBinding; | |
60 | //struct IShaderResourceBindingD3D11Methods ShaderResourceBindingD3D11; | |
63 | IShaderResourceBindingD3D11InclusiveMethods; | |
61 | 64 | }; |
62 | 65 | |
63 | 66 | typedef struct IShaderResourceBindingD3D11 |
41 | 41 | #define DILIGENT_INTERFACE_NAME ISwapChainD3D11 |
42 | 42 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
43 | 43 | |
44 | #define ISwapChainD3D11InclusiveMethods \ | |
45 | ISwapChainInclusiveMethods; \ | |
46 | ISwapChainD3D11Methods SwapChainD3D11 | |
47 | ||
44 | 48 | /// Exposes Direct3D11-specific functionality of a swap chain. |
45 | 49 | DILIGENT_BEGIN_INTERFACE(ISwapChainD3D11, ISwapChain) |
46 | 50 | { |
62 | 66 | |
63 | 67 | #if DILIGENT_C_INTERFACE |
64 | 68 | |
65 | struct ISwapChainD3D11Vtbl | |
66 | { | |
67 | struct IObjectMethods Object; | |
68 | struct IDeviceObjectMethods DeviceObject; | |
69 | struct ISwapChainMethods SwapChain; | |
70 | struct ISwapChainD3D11Methods SwapChainD3D11; | |
71 | }; | |
72 | ||
73 | 69 | // clang-format off |
74 | 70 | |
75 | 71 | # define ISwapChainD3D11_GetCurrentBackBufferRTV(This) CALL_IFACE_METHOD(SwapChainD3D11, GetCurrentBackBufferRTV, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ITextureD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ITextureD3D11InclusiveMethods \ | |
44 | ITextureInclusiveMethods; \ | |
45 | ITextureD3D11Methods TextureD3D11 | |
46 | ||
43 | 47 | /// Exposes Direct3D11-specific functionality of a texture object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(ITextureD3D11, ITexture) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct ITextureD3D11Vtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceObjectMethods DeviceObject; | |
62 | struct ITextureMethods Texture; | |
63 | struct ITextureD3D11Methods TextureD3D11; | |
64 | }; | |
65 | ||
66 | 62 | # define ITextureD3D11_GetD3D11Texture(This) CALL_IFACE_METHOD(TextureD3D11, GetD3D11Texture, This) |
67 | 63 | |
68 | 64 | #endif |
40 | 40 | #define DILIGENT_INTERFACE_NAME ITextureViewD3D11 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ITextureViewD3D11InclusiveMethods \ | |
44 | ITextureViewInclusiveMethods; \ | |
45 | ITextureViewD3D11Methods TextureViewD3D11 | |
46 | ||
43 | 47 | /// Exposes Direct3D11-specific functionality of a texture view object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(ITextureViewD3D11, ITextureView) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct ITextureViewD3D11Vtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceObjectMethods DeviceObject; | |
62 | struct ITextureViewMethods TextureView; | |
63 | struct ITextureViewD3D11Methods TextureViewD3D11; | |
64 | }; | |
65 | ||
66 | 62 | # define ITextureViewD3D11_GetD3D11View(This) CALL_IFACE_METHOD(TextureViewD3D11, GetD3D11View, This) |
67 | 63 | |
68 | 64 | #endif |
41 | 41 | #define DILIGENT_INTERFACE_NAME IBufferD3D12 |
42 | 42 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
43 | 43 | |
44 | #define IBufferD3D12InclusiveMethods \ | |
45 | IBufferInclusiveMethods; \ | |
46 | IBufferD3D12Methods BufferD3D12 | |
47 | ||
44 | 48 | // clang-format off |
45 | 49 | |
46 | 50 | /// Exposes Direct3D12-specific functionality of a buffer object. |
76 | 80 | |
77 | 81 | #if DILIGENT_C_INTERFACE |
78 | 82 | |
79 | struct IBufferD3D12Vtbl | |
80 | { | |
81 | struct IObjectMethods Object; | |
82 | struct IDeviceObjectMethods DeviceObject; | |
83 | struct IBufferMethods Buffer; | |
84 | struct IBufferD3D12Methods BufferD3D12; | |
85 | }; | |
86 | ||
87 | 83 | # define IBufferD3D12_GetD3D12Buffer(This, ...) CALL_IFACE_METHOD(BufferD3D12, GetD3D12Buffer, This, __VA_ARGS__) |
88 | 84 | # define IBufferD3D12_SetD3D12ResourceState(This, ...) CALL_IFACE_METHOD(BufferD3D12, SetD3D12ResourceState, This, __VA_ARGS__) |
89 | 85 | # define IBufferD3D12_GetD3D12ResourceState(This) CALL_IFACE_METHOD(BufferD3D12, GetD3D12ResourceState, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME IBufferViewD3D12 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IBufferViewD3D12InclusiveMethods \ | |
44 | IBufferViewInclusiveMethods; \ | |
45 | IBufferViewD3D12Methods BufferViewD3D12 | |
46 | ||
43 | 47 | /// Exposes Direct3D12-specific functionality of a buffer view object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IBufferViewD3D12, IBufferView) |
45 | 49 | { |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct IBufferViewD3D12Vtbl | |
56 | { | |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IBufferViewMethods BufferView; | |
60 | struct IBufferViewD3D12Methods BufferViewD3D12; | |
61 | }; | |
62 | ||
63 | 59 | # define IBufferViewD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(BufferViewD3D12, GetCPUDescriptorHandle, This) |
64 | 60 | |
65 | 61 | #endif |
40 | 40 | #define DILIGENT_INTERFACE_NAME ICommandQueueD3D12 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ICommandQueueD3D12InclusiveMethods \ | |
44 | IObjectInclusiveMethods; \ | |
45 | ICommandQueueD3D12Methods CommandQueueD3D12 | |
46 | ||
43 | 47 | // clang-format off |
44 | 48 | |
45 | 49 | /// Command queue interface |
74 | 78 | |
75 | 79 | #if DILIGENT_C_INTERFACE |
76 | 80 | |
77 | // clang-format on | |
78 | ||
79 | struct ICommandQueueD3D12Vtbl | |
80 | { | |
81 | struct IObjectMethods Object; | |
82 | struct ICommandQueueD3D12Methods CommandQueueD3D12; | |
83 | }; | |
84 | ||
85 | 81 | // clang-format off |
86 | 82 | |
87 | 83 | # define ICommandQueueD3D12_GetNextFenceValue(This) CALL_IFACE_METHOD(CommandQueueD3D12, GetNextFenceValue, This) |
40 | 40 | |
41 | 41 | #define DILIGENT_INTERFACE_NAME IDeviceContextD3D12 |
42 | 42 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
43 | ||
44 | #define IDeviceContextD3D12InclusiveMethods \ | |
45 | IDeviceContextInclusiveMethods; \ | |
46 | IDeviceContextD3D12Methods DeviceContextD3D12 | |
43 | 47 | |
44 | 48 | // clang-format off |
45 | 49 | |
108 | 112 | |
109 | 113 | #if DILIGENT_C_INTERFACE |
110 | 114 | |
111 | // clang-format on | |
112 | ||
113 | struct IDeviceContextD3D12Vtbl | |
114 | { | |
115 | struct IObjectMethods Object; | |
116 | struct IDeviceContextMethods DeviceContext; | |
117 | struct IDeviceContextD3D12Methods DeviceContextD3D12; | |
118 | }; | |
119 | ||
120 | 115 | // clang-format off |
121 | 116 | |
122 | 117 | # define IDeviceContextD3D12_TransitionTextureState(This, ...) CALL_IFACE_METHOD(DeviceContextD3D12, TransitionTextureState,This, __VA_ARGS__) |
51 | 51 | |
52 | 52 | // clang-format off |
53 | 53 | |
54 | #define IEngineFactoryD3D12InclusiveMethods \ | |
55 | IEngineFactoryInclusiveMethods; \ | |
56 | IEngineFactoryD3D12Methods EngineFactoryD3D12 | |
57 | ||
54 | 58 | /// Engine factory for Direct3D12 rendering backend |
55 | 59 | DILIGENT_BEGIN_INTERFACE(IEngineFactoryD3D12, IEngineFactory) |
56 | 60 | { |
175 | 179 | |
176 | 180 | #if DILIGENT_C_INTERFACE |
177 | 181 | |
178 | // clang-format on | |
179 | ||
180 | struct IEngineFactoryD3D12Vtbl | |
181 | { | |
182 | struct IObjectMethods Object; | |
183 | struct IEngineFactoryMethods EngineFactory; | |
184 | struct IEngineFactoryD3D12Methods EngineFactoryD3D12; | |
185 | }; | |
186 | ||
187 | 182 | // clang-format off |
188 | 183 | |
189 | 184 | # define IEngineFactoryD3D12_LoadD3D12(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D12, LoadD3D12, This, __VA_ARGS__) |
42 | 42 | |
43 | 43 | // clang-format off |
44 | 44 | |
45 | #define IFenceD3D12InclusiveMethods \ | |
46 | IFenceInclusiveMethods; \ | |
47 | IFenceD3D12Methods FenceD3D12 | |
48 | ||
45 | 49 | /// Exposes Direct3D12-specific functionality of a fence object. |
46 | 50 | DILIGENT_BEGIN_INTERFACE(IFenceD3D12, IFence) |
47 | 51 | { |
63 | 67 | |
64 | 68 | // clang-format off |
65 | 69 | |
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 | ||
76 | 70 | # define IFenceD3D12_GetD3D12Fence(This) CALL_IFACE_METHOD(FenceD3D12, GetD3D12Fence, This) |
77 | 71 | # define IFenceD3D12_WaitForCompletion(This, ...) CALL_IFACE_METHOD(FenceD3D12, WaitForCompletion, This, __VA_ARGS__) |
78 | 72 |
40 | 40 | #define DILIGENT_INTERFACE_NAME IPipelineStateD3D12 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IPipelineStateD3D12InclusiveMethods \ | |
44 | IPipelineStateInclusiveMethods; \ | |
45 | IPipelineStateD3D12Methods PipelineStateD3D12 | |
46 | ||
43 | 47 | /// Exposes Direct3D12-specific functionality of a pipeline state object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IPipelineStateD3D12, IPipelineState) |
45 | 49 | { |
61 | 65 | |
62 | 66 | #if DILIGENT_C_INTERFACE |
63 | 67 | |
64 | struct IPipelineStateD3D12Vtbl | |
65 | { | |
66 | struct IObjectMethods Object; | |
67 | struct IDeviceObjectMethods DeviceObject; | |
68 | struct IPipelineStateMethods PipelineState; | |
69 | struct IPipelineStateD3D12Methods PipelineStateD3D12; | |
70 | }; | |
71 | ||
72 | 68 | // clang-format off |
73 | 69 | |
74 | 70 | # define IPipelineStateD3D12_GetD3D12PipelineState(This) CALL_IFACE_METHOD(PipelineStateD3D12, GetD3D12PipelineState, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME IQueryD3D12 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IQueryD3D12InclusiveMethods \ | |
44 | IQueryInclusiveMethods; \ | |
45 | IQueryD3D12Methods QueryD3D12 | |
46 | ||
43 | 47 | /// Exposes Direct3D12-specific functionality of a Query object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IQueryD3D12, IQuery) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct IQueryD3D12Vtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceObjectMethods DeviceObject; | |
62 | struct IQueryMethods Query; | |
63 | struct IQueryD3D12Methods QueryD3D12; | |
64 | }; | |
65 | ||
66 | 62 | # define IQueryD3D12_GetD3D12QueryHeap(This) CALL_IFACE_METHOD(QueryD3D12, GetD3D12QueryHeap, This) |
67 | 63 | # define IQueryD3D12_GetQueryHeapIndex(This) CALL_IFACE_METHOD(QueryD3D12, GetQueryHeapIndex, This) |
68 | 64 |
39 | 39 | |
40 | 40 | #define DILIGENT_INTERFACE_NAME IRenderDeviceD3D12 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | ||
43 | #define IRenderDeviceD3D12InclusiveMethods \ | |
44 | IRenderDeviceInclusiveMethods; \ | |
45 | IRenderDeviceD3D12Methods RenderDeviceD3D12 | |
42 | 46 | |
43 | 47 | // clang-format off |
44 | 48 | |
101 | 105 | |
102 | 106 | #if DILIGENT_C_INTERFACE |
103 | 107 | |
104 | // clang-format on | |
105 | ||
106 | struct IRenderDeviceD3D12Vtbl | |
107 | { | |
108 | struct IObjectMethods Object; | |
109 | struct IRenderDeviceMethods RenderDevice; | |
110 | struct IRenderDeviceD3D12Methods RenderDeviceD3D12; | |
111 | }; | |
112 | ||
113 | 108 | // clang-format off |
114 | 109 | |
115 | 110 | # define IRenderDeviceD3D12_GetD3D12Device(This) CALL_IFACE_METHOD(RenderDeviceD3D12, GetD3D12Device, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ISamplerD3D12 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ISamplerD3D12InclusiveMethods \ | |
44 | ISamplerInclusiveMethods; \ | |
45 | ISamplerD3D12Methods SamplerD3D12 | |
46 | ||
43 | 47 | /// Exposes Direct3D12-specific functionality of a sampler object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(ISamplerD3D12, ISampler) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct ISamplerD3D12Vtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceObjectMethods DeviceObject; | |
62 | //struct ISamplerMethods Sampler; | |
63 | struct ISamplerD3D12Methods SamplerD3D12; | |
64 | }; | |
65 | ||
66 | 62 | # define ISamplerD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(SamplerD3D12, GetCPUDescriptorHandle, This) |
67 | 63 | |
68 | 64 | #endif |
40 | 40 | #define DILIGENT_INTERFACE_NAME IShaderD3D12 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | // clang-format off | |
44 | #define IShaderD3D12InclusiveMethods \ | |
45 | IShaderD3DInclusiveMethods \ | |
46 | /*IShaderD3D12Methods ShaderD3D12*/ | |
47 | // clang-format on | |
48 | ||
43 | 49 | #if DILIGENT_CPP_INTERFACE |
44 | 50 | |
45 | 51 | /// Exposes Direct3D12-specific functionality of a shader object. |
60 | 66 | |
61 | 67 | struct IShaderD3D12Vtbl |
62 | 68 | { |
63 | struct IObjectMethods Object; | |
64 | struct IDeviceObjectMethods DeviceObject; | |
65 | struct IShaderMethods Shader; | |
66 | struct IShaderD3DMethods ShaderD3D; | |
67 | //struct IShaderD3D12Methods ShaderD3D12; | |
69 | IShaderD3D12InclusiveMethods; | |
68 | 70 | }; |
69 | 71 | |
70 | 72 | typedef struct IShaderD3D12 |
40 | 40 | #define DILIGENT_INTERFACE_NAME IShaderResourceBindingD3D12 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | // clang-format off | |
44 | #define IShaderResourceBindingD3D12InclusiveMethods \ | |
45 | IShaderResourceBindingInclusiveMethods \ | |
46 | /*IShaderResourceBindingD3D12Methods ShaderResourceBindingD3D12*/ | |
47 | // clang-format on | |
48 | ||
43 | 49 | #if DILIGENT_CPP_INTERFACE |
44 | 50 | |
45 | 51 | /// Exposes Direct3D12-specific functionality of a shader resource binding. |
54 | 60 | |
55 | 61 | struct IShaderResourceBindingD3D12Vtbl |
56 | 62 | { |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IShaderResourceBindingMethods ShaderResourceBinding; | |
60 | //struct IShaderResourceBindingD3D12Methods ShaderResourceBindingD3D12; | |
63 | IShaderResourceBindingD3D12InclusiveMethods; | |
61 | 64 | }; |
62 | 65 | |
63 | 66 | typedef struct IShaderResourceBindingD3D12 |
43 | 43 | #define DILIGENT_INTERFACE_NAME ISwapChainD3D12 |
44 | 44 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
45 | 45 | |
46 | #define ISwapChainD3D12InclusiveMethods \ | |
47 | ISwapChainInclusiveMethods; \ | |
48 | ISwapChainD3D12Methods SwapChainD3D12 | |
49 | ||
46 | 50 | /// Exposes Direct3D12-specific functionality of a swap chain. |
47 | 51 | DILIGENT_BEGIN_INTERFACE(ISwapChainD3D12, ISwapChain) |
48 | 52 | { |
58 | 62 | |
59 | 63 | #if DILIGENT_C_INTERFACE |
60 | 64 | |
61 | struct ISwapChainD3D12Vtbl | |
62 | { | |
63 | struct IObjectMethods Object; | |
64 | struct IDeviceObjectMethods DeviceObject; | |
65 | struct ISwapChainMethods SwapChain; | |
66 | struct ISwapChainD3D12Methods SwapChainD3D12; | |
67 | }; | |
68 | ||
69 | 65 | // clang-format off |
70 | 66 | |
71 | 67 | # define ISwapChainD3D12_GetDXGISwapChain(This) CALL_IFACE_METHOD(SwapChainD3D12, GetDXGISwapChain, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ITextureD3D12 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ITextureD3D12InclusiveMethods \ | |
44 | ITextureInclusiveMethods; \ | |
45 | ITextureD3D12Methods TextureD3D12 | |
46 | ||
43 | 47 | // clang-format off |
44 | 48 | |
45 | 49 | /// Exposes Direct3D12-specific functionality of a texture object. |
68 | 72 | |
69 | 73 | #if DILIGENT_C_INTERFACE |
70 | 74 | |
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 | ||
81 | 75 | // clang-format off |
82 | 76 | |
83 | 77 | # define ITextureD3D12_GetD3D12Texture(This) CALL_IFACE_METHOD(TextureD3D12, GetD3D12Texture, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ITextureViewD3D12 |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ITextureViewD3D12InclusiveMethods \ | |
44 | ITextureViewInclusiveMethods; \ | |
45 | ITextureViewD3D12Methods TextureViewD3D12 | |
46 | ||
43 | 47 | /// Exposes Direct3D12-specific functionality of a texture view object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(ITextureViewD3D12, ITextureView) |
45 | 49 | { |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct ITextureViewD3D12Vtbl | |
56 | { | |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct ITextureViewMethods TextureView; | |
60 | struct ITextureViewD3D12Methods TextureViewD3D12; | |
61 | }; | |
62 | ||
63 | 59 | # define ITextureViewD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(TextureViewD3D12, GetCPUDescriptorHandle, This) |
64 | 60 | |
65 | 61 | #endif |
53 | 53 | #define DILIGENT_INTERFACE_NAME IShaderD3D |
54 | 54 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
55 | 55 | |
56 | #define IShaderD3DInclusiveMethods \ | |
57 | IShaderInclusiveMethods; \ | |
58 | IShaderD3DMethods ShaderD3D | |
59 | ||
56 | 60 | // clang-format off |
57 | 61 | |
58 | 62 | /// Exposes Direct3D-specific functionality of a shader object. |
69 | 73 | |
70 | 74 | #if DILIGENT_C_INTERFACE |
71 | 75 | |
72 | // clang-format on | |
73 | ||
74 | struct IShaderD3DVtbl | |
75 | { | |
76 | struct IObjectMethods Object; | |
77 | struct IDeviceObjectMethods DeviceObject; | |
78 | struct IShaderD3DMethods ShaderD3D; | |
79 | }; | |
80 | ||
81 | 76 | // clang-format off |
82 | 77 | |
83 | 78 | # define IShaderD3D_GetHLSLResource(This, ...) CALL_IFACE_METHOD(ShaderD3D, GetHLSLResource, This, __VA_ARGS__) |
33 | 33 | |
34 | 34 | DILIGENT_BEGIN_NAMESPACE(Diligent) |
35 | 35 | |
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 | ||
36 | 40 | #define DILIGENT_INTERFACE_NAME IBufferGL |
37 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
38 | 42 | |
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 | |
42 | 46 | |
43 | 47 | /// Exposes OpenGL-specific functionality of a buffer object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IBufferGL, IBuffer) |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct IBufferGLVtbl | |
56 | { | |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IBufferMethods Buffer; | |
60 | struct IBufferGLMethods BufferGL; | |
61 | }; | |
62 | ||
63 | 59 | # define IBufferGL_GetGLBufferHandle(This) CALL_IFACE_METHOD(BufferGL, GetGLBufferHandle, This) |
64 | 60 | |
65 | 61 | #endif |
40 | 40 | #define DILIGENT_INTERFACE_NAME IBufferViewGL |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IBufferViewGLInclusiveMethods \ | |
44 | IBufferViewInclusiveMethods | |
45 | //IBufferViewGLMethods BufferViewGL | |
46 | ||
43 | 47 | #if DILIGENT_CPP_INTERFACE |
44 | 48 | |
45 | 49 | /// Exposes OpenGL-specific functionality of a buffer view object. |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct IBufferViewGLVtbl | |
59 | typedef struct IBufferViewGLVtbl | |
56 | 60 | { |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IBufferViewMethods BufferView; | |
60 | //struct IBufferViewGLMethods BufferViewGL; | |
61 | }; | |
61 | IBufferViewGLInclusiveMethods; | |
62 | } IBufferViewGLVtbl; | |
62 | 63 | |
63 | 64 | typedef struct IBufferViewGL |
64 | 65 | { |
42 | 42 | #define DILIGENT_INTERFACE_NAME IDeviceContextGL |
43 | 43 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
44 | 44 | |
45 | #define IDeviceContextGLInclusiveMethods \ | |
46 | IDeviceContextInclusiveMethods; \ | |
47 | IDeviceContextGLMethods DeviceContextGL | |
48 | ||
45 | 49 | // clang-format off |
46 | 50 | |
47 | 51 | /// Exposes OpenGL-specific functionality of a device context. |
67 | 71 | |
68 | 72 | #if DILIGENT_C_INTERFACE |
69 | 73 | |
70 | // clang-format on | |
71 | ||
72 | struct IDeviceContextGLVtbl | |
73 | { | |
74 | struct IObjectMethods Object; | |
75 | struct IDeviceContextMethods DeviceContext; | |
76 | struct IDeviceContextGLMethods DeviceContextGL; | |
77 | }; | |
78 | ||
79 | 74 | // clang-format off |
80 | 75 | |
81 | 76 | # define IDeviceContextGL_UpdateCurrentGLContext(This) CALL_IFACE_METHOD(DeviceContextGL, UpdateCurrentGLContext, This) |
60 | 60 | #define DILIGENT_INTERFACE_NAME IEngineFactoryOpenGL |
61 | 61 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
62 | 62 | |
63 | #define IEngineFactoryOpenGLInclusiveMethods \ | |
64 | IEngineFactoryInclusiveMethods; \ | |
65 | IEngineFactoryOpenGLMethods EngineFactoryOpenGL | |
66 | ||
63 | 67 | // clang-format off |
64 | 68 | |
65 | 69 | DILIGENT_BEGIN_INTERFACE(IEngineFactoryOpenGL, IEngineFactory) |
84 | 88 | #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" |
85 | 89 | |
86 | 90 | #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 | }; | |
96 | 91 | |
97 | 92 | // clang-format off |
98 | 93 |
40 | 40 | #define DILIGENT_INTERFACE_NAME IFenceGL |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IFenceGLInclusiveMethods \ | |
44 | IFenceInclusiveMethods | |
45 | //IFenceGLMethods FenceGL | |
46 | ||
43 | 47 | #if DILIGENT_CPP_INTERFACE |
44 | 48 | |
45 | 49 | /// Exposes OpenGL-specific functionality of a fence object. |
54 | 58 | |
55 | 59 | struct IFenceGLVtbl |
56 | 60 | { |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IFenceMethods Fence; | |
60 | //struct IFenceGLMethods FenceGL; | |
61 | IFenceGLInclusiveMethods; | |
61 | 62 | }; |
62 | 63 | |
63 | 64 | typedef struct IFenceGL |
40 | 40 | #define DILIGENT_INTERFACE_NAME IPipelineStateGL |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IPipelineStateGLInclusiveMethods \ | |
44 | IPipelineStateInclusiveMethods | |
45 | //IPipelineStateGLMethods PipelineStateGL | |
46 | ||
43 | 47 | #if DILIGENT_CPP_INTERFACE |
44 | 48 | |
45 | 49 | /// Exposes OpenGL-specific functionality of a pipeline state object. |
54 | 58 | |
55 | 59 | struct IPipelineStateGLVtbl |
56 | 60 | { |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IPipelineStateMethods PipelineState; | |
60 | //struct IPipelineStateGLMethods PipelineStateGL; | |
61 | IPipelineStateGLInclusiveMethods; | |
61 | 62 | }; |
62 | 63 | |
63 | 64 | typedef struct IPipelineStateGL |
37 | 37 | static const INTERFACE_ID IID_QueryGL = |
38 | 38 | {0xd8a02ab7, 0x720, 0x417d, {0xaa, 0x9b, 0x20, 0xa2, 0xc0, 0x5a, 0x3e, 0xe0}}; |
39 | 39 | |
40 | ||
41 | 40 | #define DILIGENT_INTERFACE_NAME IQueryGL |
42 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | ||
43 | #define IQueryGLInclusiveMethods \ | |
44 | IQueryInclusiveMethods; \ | |
45 | IQueryGLMethods QueryGL | |
43 | 46 | |
44 | 47 | /// Exposes OpenGL-specific functionality of a Query object. |
45 | 48 | DILIGENT_BEGIN_INTERFACE(IQueryGL, IQuery) |
53 | 56 | |
54 | 57 | #if DILIGENT_C_INTERFACE |
55 | 58 | |
56 | struct IQueryGLVtbl | |
57 | { | |
58 | struct IObjectMethods Object; | |
59 | struct IDeviceObjectMethods DeviceObject; | |
60 | struct IQueryMethods Query; | |
61 | struct IQueryGLMethods QueryGL; | |
62 | }; | |
63 | ||
64 | 59 | # define IQueryGL_GetGlQueryHandle(This) CALL_IFACE_METHOD(QueryGL, GetGlQueryHandle, This) |
65 | 60 | |
66 | 61 | #endif |
40 | 40 | |
41 | 41 | #define DILIGENT_INTERFACE_NAME IRenderDeviceGL |
42 | 42 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
43 | ||
44 | #define IRenderDeviceGLInclusiveMethods \ | |
45 | IRenderDeviceInclusiveMethods; \ | |
46 | IRenderDeviceGLMethods RenderDeviceGL | |
43 | 47 | |
44 | 48 | // clang-format off |
45 | 49 | |
109 | 113 | |
110 | 114 | #if DILIGENT_C_INTERFACE |
111 | 115 | |
112 | // clang-format on | |
113 | ||
114 | struct IRenderDeviceGLVtbl | |
115 | { | |
116 | struct IObjectMethods Object; | |
117 | struct IRenderDeviceMethods RenderDevice; | |
118 | struct IRenderDeviceGLMethods RenderDeviceGL; | |
119 | }; | |
120 | ||
121 | 116 | // clang-format off |
122 | 117 | |
123 | 118 | # define IRenderDeviceGL_CreateTextureFromGLHandle(This, ...)CALL_IFACE_METHOD(RenderDeviceGL, CreateTextureFromGLHandle, This, __VA_ARGS__) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ISamplerGL |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ISamplerGLInclusiveMethods \ | |
44 | ISamplerInclusiveMethods | |
45 | //ISamplerGLMethods SamplerGL | |
46 | ||
43 | 47 | #if DILIGENT_CPP_INTERFACE |
44 | 48 | |
45 | 49 | /// Exposes OpenGL-specific functionality of a sampler object. |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct ISamplerGLVtbl | |
59 | typedef struct ISamplerGLVtbl | |
56 | 60 | { |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | //struct ISamplerMethods Sampler; | |
60 | //struct ISamplerGLMethods SamplerGL; | |
61 | }; | |
61 | ISamplerGLInclusiveMethods; | |
62 | } ISamplerGLVtbl; | |
62 | 63 | |
63 | 64 | typedef struct ISamplerGL |
64 | 65 | { |
40 | 40 | #define DILIGENT_INTERFACE_NAME IShaderGL |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IShaderGLInclusiveMethods \ | |
44 | IShaderInclusiveMethods | |
45 | //IShaderGLMethods ShaderGL | |
46 | ||
43 | 47 | #if DILIGENT_CPP_INTERFACE |
44 | 48 | |
45 | 49 | /// Exposes OpenGL-specific functionality of a shader object. |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct IShaderGLVtbl | |
59 | typedef struct IShaderGLVtbl | |
56 | 60 | { |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IShaderMethods Shader; | |
60 | //struct IShaderGLMethods ShaderGL; | |
61 | }; | |
61 | IShaderGLInclusiveMethods; | |
62 | } IShaderGLVtbl; | |
62 | 63 | |
63 | 64 | #endif |
64 | 65 |
40 | 40 | #define DILIGENT_INTERFACE_NAME IShaderResourceBindingGL |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IShaderResourceBindingGLInclusiveMethods \ | |
44 | IShaderResourceBindingInclusiveMethods | |
45 | //IShaderResourceBindingGLMethods ShaderResourceBindingGL | |
46 | ||
43 | 47 | #if DILIGENT_CPP_INTERFACE |
44 | 48 | |
45 | 49 | /// Exposes OpenGL-specific functionality of a shader resource binding object. |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct IShaderResourceBindingGLVtbl | |
59 | typedef struct IShaderResourceBindingGLVtbl | |
56 | 60 | { |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IShaderResourceBindingMethods ShaderResourceBinding; | |
60 | //struct IShaderResourceBindingGLMethods ShaderResourceBindingGL; | |
61 | }; | |
61 | IShaderResourceBindingGLInclusiveMethods; | |
62 | } IShaderResourceBindingGLVtbl; | |
62 | 63 | |
63 | 64 | #endif |
64 | 65 |
37 | 37 | static const INTERFACE_ID IID_SwapChainGL = |
38 | 38 | {0xf457bd7c, 0xe725, 0x4d3e, {0x86, 0x7, 0xa1, 0xf9, 0xba, 0xe3, 0x29, 0xeb}}; |
39 | 39 | |
40 | #define ISwapChainGLInclusiveMethods \ | |
41 | ISwapChainInclusiveMethods; \ | |
42 | ISwapChainGLMethods SwapChainGL | |
43 | ||
40 | 44 | #define DILIGENT_INTERFACE_NAME ISwapChainGL |
41 | 45 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 46 | |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct ISwapChainGLVtbl | |
56 | { | |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct ISwapChainMethods SwapChain; | |
60 | struct ISwapChainGLMethods SwapChainGL; | |
61 | }; | |
62 | ||
63 | 59 | // clang-format off |
64 | 60 | |
65 | 61 | # define ISwapChainGL_GetDefaultFBO(This) CALL_IFACE_METHOD(SwapChainGL, GetDefaultFBO, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ITextureGL |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ITextureGLInclusiveMethods \ | |
44 | ITextureInclusiveMethods; \ | |
45 | ITextureGLMethods TextureGL | |
46 | ||
43 | 47 | /// Exposes OpenGL-specific functionality of a texture object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(ITextureGL, ITexture) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct ITextureGLVtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceObjectMethods DeviceObject; | |
62 | struct ITextureMethods Texture; | |
63 | struct ITextureGLMethods TextureGL; | |
64 | }; | |
65 | ||
66 | 62 | // clang-format off |
67 | 63 | |
68 | 64 | # define ITextureGL_GetGLTextureHandle(This) CALL_IFACE_METHOD(TextureGL, GetGLTextureHandle, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ITextureViewGL |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ITextureViewGLInclusiveMethods \ | |
44 | ITextureViewInclusiveMethods | |
45 | //ITextureViewGLMethods TextureViewGL | |
46 | ||
43 | 47 | #if DILIGENT_CPP_INTERFACE |
44 | 48 | |
45 | 49 | /// Exposes OpenGL-specific functionality of a texture view object. |
56 | 60 | |
57 | 61 | #if DILIGENT_C_INTERFACE |
58 | 62 | |
59 | struct ITextureViewGLVtbl | |
63 | typedef struct ITextureViewGLVtbl | |
60 | 64 | { |
61 | struct IObjectMethods Object; | |
62 | struct IDeviceObjectMethods DeviceObject; | |
63 | struct ITextureViewMethods TextureView; | |
64 | //struct ITextureViewGLMethods TextureViewGL; | |
65 | }; | |
65 | ITextureViewGLInclusiveMethods; | |
66 | } ITextureViewGLVtbl; | |
66 | 67 | |
67 | 68 | typedef struct ITextureViewGL |
68 | 69 | { |
40 | 40 | #define DILIGENT_INTERFACE_NAME IBufferViewVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IBufferViewVkInclusiveMethods \ | |
44 | IBufferViewInclusiveMethods; \ | |
45 | IBufferViewVkMethods BufferViewVk | |
46 | ||
43 | 47 | // clang-format off |
44 | 48 | |
45 | 49 | /// Exposes Vulkan-specific functionality of a buffer view object. |
54 | 58 | |
55 | 59 | #if DILIGENT_C_INTERFACE |
56 | 60 | |
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 | ||
67 | 61 | // clang-format off |
68 | 62 | |
69 | 63 | # define IBufferViewVk_GetVkBufferView(This) CALL_IFACE_METHOD(BufferViewVk, GetVkBufferView, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME IBufferVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IBufferVkInclusiveMethods \ | |
44 | IBufferInclusiveMethods; \ | |
45 | IBufferVkMethods BufferVk | |
46 | ||
43 | 47 | // clang-format off |
44 | 48 | |
45 | 49 | /// Exposes Vulkan-specific functionality of a buffer object. |
64 | 68 | |
65 | 69 | #if DILIGENT_C_INTERFACE |
66 | 70 | |
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 | ||
77 | 71 | # define IBufferVk_GetVkBuffer(This) CALL_IFACE_METHOD(BufferVk, GetVkBuffer, This) |
78 | 72 | # define IBufferVk_SetAccessFlags(This, ...) CALL_IFACE_METHOD(BufferVk, SetAccessFlags, This, __VA_ARGS__) |
79 | 73 | # define IBufferVk_GetAccessFlags(This) CALL_IFACE_METHOD(BufferVk, GetAccessFlags, This) |
39 | 39 | |
40 | 40 | #define DILIGENT_INTERFACE_NAME ICommandQueueVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | ||
43 | #define ICommandQueueVkInclusiveMethods \ | |
44 | IObjectInclusiveMethods; \ | |
45 | ICommandQueueVkMethods CommandQueueVk | |
42 | 46 | |
43 | 47 | // clang-format off |
44 | 48 | |
88 | 92 | |
89 | 93 | #if DILIGENT_C_INTERFACE |
90 | 94 | |
91 | // clang-format on | |
92 | ||
93 | struct ICommandQueueVkVtbl | |
94 | { | |
95 | struct IObjectMethods Object; | |
96 | struct ICommandQueueVkMethods CommandQueueVk; | |
97 | }; | |
98 | ||
99 | 95 | // clang-format off |
100 | 96 | |
101 | 97 | # define ICommandQueueVk_GetNextFenceValue(This) CALL_IFACE_METHOD(CommandQueueVk, GetNextFenceValue, This) |
40 | 40 | |
41 | 41 | #define DILIGENT_INTERFACE_NAME IDeviceContextVk |
42 | 42 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
43 | ||
44 | #define IDeviceContextVkInclusiveMethods \ | |
45 | IDeviceContextInclusiveMethods; \ | |
46 | IDeviceContextVkMethods DeviceContextVk | |
43 | 47 | |
44 | 48 | // clang-format off |
45 | 49 | |
91 | 95 | |
92 | 96 | #if DILIGENT_C_INTERFACE |
93 | 97 | |
94 | // clang-format on | |
95 | ||
96 | struct IDeviceContextVkVtbl | |
97 | { | |
98 | struct IObjectMethods Object; | |
99 | struct IDeviceContextMethods DeviceContext; | |
100 | struct IDeviceContextVkMethods DeviceContextVk; | |
101 | }; | |
102 | ||
103 | 98 | // clang-format off |
104 | 99 | |
105 | 100 | # define IDeviceContextVk_TransitionImageLayout(This, ...) CALL_IFACE_METHOD(DeviceContextVk, TransitionImageLayout, This, __VA_ARGS__) |
57 | 57 | #define DILIGENT_INTERFACE_NAME IEngineFactoryVk |
58 | 58 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
59 | 59 | |
60 | #define IEngineFactoryVkInclusiveMethods \ | |
61 | IEngineFactoryInclusiveMethods; \ | |
62 | IEngineFactoryVkMethods EngineFactoryVk | |
63 | ||
60 | 64 | // clang-format off |
61 | 65 | |
62 | 66 | DILIGENT_BEGIN_INTERFACE(IEngineFactoryVk, IEngineFactory) |
85 | 89 | |
86 | 90 | #if DILIGENT_C_INTERFACE |
87 | 91 | |
88 | // clang-format on | |
89 | ||
90 | struct IEngineFactoryVkVtbl | |
91 | { | |
92 | struct IObjectMethods Object; | |
93 | struct IEngineFactoryMethods EngineFactory; | |
94 | struct IEngineFactoryVkMethods EngineFactoryVk; | |
95 | }; | |
96 | ||
97 | 92 | // clang-format off |
98 | 93 | |
99 | 94 | # define IEngineFactoryVk_CreateDeviceAndContextsVk(This, ...) CALL_IFACE_METHOD(EngineFactoryVk, CreateDeviceAndContextsVk, This, __VA_ARGS__) |
40 | 40 | #define DILIGENT_INTERFACE_NAME IFenceVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IFenceVkInclusiveMethods \ | |
44 | IFenceInclusiveMethods | |
45 | //IFenceVkMethods FenceVk | |
46 | ||
43 | 47 | // clang-format off |
44 | 48 | |
45 | 49 | #if DILIGENT_CPP_INTERFACE |
58 | 62 | |
59 | 63 | // clang-format off |
60 | 64 | |
61 | struct IFenceVkVtbl | |
65 | typedef struct IFenceVkVtbl | |
62 | 66 | { |
63 | struct IObjectMethods Object; | |
64 | struct IDeviceObjectMethods DeviceObject; | |
65 | struct IFenceMethods Fence; | |
66 | //struct IFenceVkMethods FenceVk; | |
67 | }; | |
67 | IFenceVkInclusiveMethods; | |
68 | } IFenceVkVtbl; | |
68 | 69 | |
69 | 70 | typedef struct IFenceVk |
70 | 71 | { |
40 | 40 | #define DILIGENT_INTERFACE_NAME IPipelineStateVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IPipelineStateVkInclusiveMethods \ | |
44 | IPipelineStateInclusiveMethods; \ | |
45 | IPipelineStateVkMethods PipelineStateVk | |
46 | ||
43 | 47 | /// Exposes Vulkan-specific functionality of a pipeline state object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(IPipelineStateVk, IPipelineState) |
45 | 49 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct IPipelineStateVkVtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceObjectMethods DeviceObject; | |
62 | struct IPipelineStateMethods PipelineState; | |
63 | struct IPipelineStateVkMethods PipelineStateVk; | |
64 | }; | |
65 | ||
66 | 62 | // clang-format off |
67 | 63 | |
68 | 64 | # define IPipelineStateVk_GetVkRenderPass(This) CALL_IFACE_METHOD(PipelineStateVk, GetVkRenderPass, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME IQueryVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IQueryVkInclusiveMethods \ | |
44 | IQueryInclusiveMethods | |
45 | //IQueryVkMethods QueryVk | |
46 | ||
43 | 47 | #if DILIGENT_CPP_INTERFACE |
44 | 48 | |
45 | 49 | /// Exposes Vulkan-specific functionality of a Query object. |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct IQueryVkVtbl | |
59 | typedef struct IQueryVkVtbl | |
56 | 60 | { |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IQueryMethods Query; | |
60 | //struct IQueryVkMethods QueryVk; | |
61 | }; | |
61 | IQueryVkInclusiveMethods; | |
62 | } IQueryVkVtbl; | |
62 | 63 | |
63 | 64 | typedef struct IQueryVk |
64 | 65 | { |
39 | 39 | |
40 | 40 | #define DILIGENT_INTERFACE_NAME IRenderDeviceVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | ||
43 | #define IRenderDeviceVkInclusiveMethods \ | |
44 | IRenderDeviceInclusiveMethods; \ | |
45 | IRenderDeviceVkMethods RenderDeviceVk | |
42 | 46 | |
43 | 47 | // clang-format off |
44 | 48 | |
114 | 118 | |
115 | 119 | #if DILIGENT_C_INTERFACE |
116 | 120 | |
117 | // clang-format on | |
118 | ||
119 | struct IRenderDeviceVkVtbl | |
120 | { | |
121 | struct IObjectMethods Object; | |
122 | struct IRenderDeviceMethods RenderDevice; | |
123 | struct IRenderDeviceVkMethods RenderDeviceVk; | |
124 | }; | |
125 | ||
126 | 121 | // clang-format off |
127 | 122 | |
128 | 123 | # define IRenderDeviceVk_GetVkDevice(This) CALL_IFACE_METHOD(RenderDeviceVk, GetVkDevice, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ISamplerVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ISamplerVkInclusiveMethods \ | |
44 | ISamplerInclusiveMethods; \ | |
45 | ISamplerVkMethods SamplerVk | |
46 | ||
43 | 47 | /// Exposes Vulkan-specific functionality of a sampler object. |
44 | 48 | DILIGENT_BEGIN_INTERFACE(ISamplerVk, ISampler) |
45 | 49 | { |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct ISamplerVkVtbl | |
56 | { | |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | //struct ISamplerMethods Sampler; | |
60 | struct ISamplerVkMethods SamplerVk; | |
61 | }; | |
62 | ||
63 | 59 | # define ISamplerVk_GetVkSampler(This) CALL_IFACE_METHOD(SamplerVk, GetVkSampler, This) |
64 | 60 | |
65 | 61 | #endif |
40 | 40 | #define DILIGENT_INTERFACE_NAME IShaderResourceBindingVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define IShaderResourceBindingVkInclusiveMethods \ | |
44 | IShaderResourceBindingInclusiveMethods | |
45 | //IShaderResourceBindingVkMethods ShaderResourceBindingVk | |
46 | ||
43 | 47 | #if DILIGENT_CPP_INTERFACE |
44 | 48 | |
45 | 49 | /// Exposes Vulkan-specific functionality of a shader resource binding object. |
52 | 56 | |
53 | 57 | #if DILIGENT_C_INTERFACE |
54 | 58 | |
55 | struct IShaderResourceBindingVkVtbl | |
59 | typedef struct IShaderResourceBindingVkVtbl | |
56 | 60 | { |
57 | struct IObjectMethods Object; | |
58 | struct IDeviceObjectMethods DeviceObject; | |
59 | struct IShaderResourceBindingMethods ShaderResourceBinding; | |
60 | //struct IShaderResourceBindingVkMethods ShaderResourceBindingVk; | |
61 | }; | |
61 | IShaderResourceBindingVkInclusiveMethods; | |
62 | } IShaderResourceBindingVkVtbl; | |
62 | 63 | |
63 | 64 | #endif |
64 | 65 |
42 | 42 | static const INTERFACE_ID IID_ShaderVk = |
43 | 43 | {0x8b0c91b4, 0xb1d8, 0x4e03, {0x92, 0x50, 0xa7, 0xe, 0x13, 0x1a, 0x59, 0xfa}}; |
44 | 44 | |
45 | #define IShaderVkInclusiveMethods \ | |
46 | IShaderInclusiveMethods; \ | |
47 | IShaderVkMethods ShaderVk | |
48 | ||
45 | 49 | #if DILIGENT_CPP_INTERFACE |
46 | 50 | |
47 | 51 | /// Exposes Vulkan-specific functionality of a shader object. |
43 | 43 | #define DILIGENT_INTERFACE_NAME ISwapChainVk |
44 | 44 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
45 | 45 | |
46 | #define ISwapChainVkInclusiveMethods \ | |
47 | ISwapChainInclusiveMethods; \ | |
48 | ISwapChainVkMethods SwapChainVk | |
49 | ||
46 | 50 | /// Exposes Vulkan-specific functionality of a swap chain. |
47 | 51 | DILIGENT_BEGIN_INTERFACE(ISwapChainVk, ISwapChain) |
48 | 52 | { |
55 | 59 | |
56 | 60 | #if DILIGENT_C_INTERFACE |
57 | 61 | |
58 | struct ISwapChainVkVtbl | |
59 | { | |
60 | struct IObjectMethods Object; | |
61 | struct IDeviceObjectMethods DeviceObject; | |
62 | struct ISwapChainMethods SwapChain; | |
63 | struct ISwapChainVkMethods SwapChainVk; | |
64 | }; | |
65 | ||
66 | 62 | // clang-format off |
67 | 63 | |
68 | 64 | # define ISwapChainVk_GetVkSwapChain(This) CALL_IFACE_METHOD(SwapChainVk, GetVkSwapChain, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ITextureViewVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ITextureViewVkInclusiveMethods \ | |
44 | ITextureViewInclusiveMethods; \ | |
45 | ITextureViewVkMethods TextureViewVk | |
46 | ||
43 | 47 | // clang-format off |
44 | 48 | |
45 | 49 | /// Exposes Vulkan-specific functionality of a texture view object. |
54 | 58 | |
55 | 59 | #if DILIGENT_C_INTERFACE |
56 | 60 | |
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 | ||
67 | 61 | // clang-format off |
68 | 62 | |
69 | 63 | # define ITextureViewVk_GetVulkanImageView(This) CALL_IFACE_METHOD(TextureViewVk, GetVulkanImageView, This) |
40 | 40 | #define DILIGENT_INTERFACE_NAME ITextureVk |
41 | 41 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
42 | 42 | |
43 | #define ITextureVkInclusiveMethods \ | |
44 | ITextureInclusiveMethods; \ | |
45 | ITextureVkMethods TextureVk | |
46 | ||
43 | 47 | // clang-format off |
44 | 48 | |
45 | 49 | /// Exposes Vulkan-specific functionality of a texture object. |
67 | 71 | |
68 | 72 | #if DILIGENT_C_INTERFACE |
69 | 73 | |
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 | ||
80 | 74 | // clang-format off |
81 | 75 | |
82 | 76 | # define ITextureVk_GetVkImage(This) CALL_IFACE_METHOD(TextureVk, GetVkImage,This) |
42 | 42 | #define DILIGENT_INTERFACE_NAME IHLSL2GLSLConversionStream |
43 | 43 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
44 | 44 | |
45 | #define IHLSL2GLSLConversionStreamInclusiveMethods \ | |
46 | IObjectInclusiveMethods; \ | |
47 | IHLSL2GLSLConversionStreamMethods HLSL2GLSLConversionStream | |
48 | ||
45 | 49 | // clang-format off |
46 | 50 | |
47 | 51 | DILIGENT_BEGIN_INTERFACE(IHLSL2GLSLConversionStream, IObject) |
60 | 64 | |
61 | 65 | #if DILIGENT_C_INTERFACE |
62 | 66 | |
63 | // clang-format on | |
64 | ||
65 | struct IHLSL2GLSLConversionStreamVtbl | |
66 | { | |
67 | struct IObjectMethods Object; | |
68 | struct IHLSL2GLSLConversionStreamMethods HLSL2GLSLConversionStream; | |
69 | }; | |
70 | ||
71 | 67 | // clang-format off |
72 | 68 | |
73 | 69 | # define IHLSL2GLSLConversionStream_Convert(This, ...) CALL_IFACE_METHOD(HLSL2GLSLConversionStream, Convert, This, __VA_ARGS__) |
83 | 79 | |
84 | 80 | #define DILIGENT_INTERFACE_NAME IHLSL2GLSLConverter |
85 | 81 | #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" |
82 | ||
83 | #define IHLSL2GLSLConverterInclusiveMethods \ | |
84 | IObjectInclusiveMethods; \ | |
85 | IHLSL2GLSLConverterMethods HLSL2GLSLConverter | |
86 | 86 | |
87 | 87 | // clang-format off |
88 | 88 | |
102 | 102 | |
103 | 103 | #if DILIGENT_C_INTERFACE |
104 | 104 | |
105 | // clang-format on | |
106 | ||
107 | struct IHLSL2GLSLConverterVtbl | |
108 | { | |
109 | struct IObjectMethods Object; | |
110 | struct IHLSL2GLSLConverterMethods HLSL2GLSLConverter; | |
111 | }; | |
112 | ||
113 | 105 | // clang-format off |
114 | 106 | |
115 | 107 | # define IHLSL2GLSLConverter_CreateStream(This, ...) CALL_IFACE_METHOD(HLSL2GLSLConverter, CreateStream, This, __VA_ARGS__) |
54 | 54 | |
55 | 55 | # define DILIGENT_GLOBAL_FUNCTION(FuncName) Diligent_##FuncName |
56 | 56 | |
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 | |
60 | 63 | |
61 | 64 | # define DEFAULT_VALUE(x) |
62 | 65 | |
63 | 66 | # define CALL_IFACE_METHOD(Iface, Method, This, ...) (This)->pVtbl->Iface.Method((I##Iface*)(This), ##__VA_ARGS__) |
64 | 67 | |
65 | 68 | // 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) | |
68 | 71 | |
69 | 72 | #else |
70 | 73 |
43 | 43 | #define DILIGENT_INTERFACE_NAME IDataBlob |
44 | 44 | #include "DefineInterfaceHelperMacros.h" |
45 | 45 | |
46 | ||
46 | #define IDataBlobInclusiveMethods \ | |
47 | IObjectInclusiveMethods; \ | |
48 | IDataBlobMethods DataBlob | |
47 | 49 | |
48 | 50 | /// Base interface for a file stream |
49 | 51 | DILIGENT_BEGIN_INTERFACE(IDataBlob, IObject) |
64 | 66 | |
65 | 67 | #if DILIGENT_C_INTERFACE |
66 | 68 | |
67 | ||
68 | // clang-format on | |
69 | ||
70 | struct IDataBlobVtbl | |
71 | { | |
72 | struct IObjectMethods Object; | |
73 | struct IDataBlobMethods DataBlob; | |
74 | }; | |
75 | ||
76 | 69 | // clang-format off |
77 | 70 | |
78 | 71 | # define IDataBlob_Resize(This, ...) CALL_IFACE_METHOD(DataBlob, Resize, This, __VA_ARGS__) |
56 | 56 | # define REF * |
57 | 57 | # define METHOD(Name) (*Name) |
58 | 58 | |
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 | ||
59 | 69 | // clang-format off |
60 | 70 | # 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); | |
65 | 76 | // clang-format on |
66 | 77 | |
67 | 78 | #else |
44 | 44 | #define DILIGENT_INTERFACE_NAME IFileStream |
45 | 45 | #include "DefineInterfaceHelperMacros.h" |
46 | 46 | |
47 | #define IFileStreamInclusiveMethods \ | |
48 | IObjectInclusiveMethods; \ | |
49 | IFileStreamMethods FileStream | |
47 | 50 | |
48 | 51 | /// Base interface for a file stream |
49 | 52 | DILIGENT_BEGIN_INTERFACE(IFileStream, IObject) |
69 | 72 | |
70 | 73 | #include "UndefInterfaceHelperMacros.h" |
71 | 74 | |
72 | ||
73 | 75 | #if DILIGENT_C_INTERFACE |
74 | ||
75 | ||
76 | // clang-format on | |
77 | ||
78 | struct IFileStreamVtbl | |
79 | { | |
80 | struct IObjectMethods Object; | |
81 | struct IFileStreamMethods FileStream; | |
82 | }; | |
83 | 76 | |
84 | 77 | // clang-format off |
85 | 78 |
84 | 84 | |
85 | 85 | // clang-format off |
86 | 86 | |
87 | struct IObjectMethods | |
87 | typedef struct IObjectMethods | |
88 | 88 | { |
89 | 89 | void (*QueryInterface) (struct IObject*, const struct INTERFACE_ID* IID, struct IObject** ppInterface); |
90 | 90 | ReferenceCounterValueType (*AddRef) (struct IObject*); |
91 | 91 | ReferenceCounterValueType (*Release) (struct IObject*); |
92 | 92 | struct IReferenceCounters* (*GetReferenceCounters)(struct IObject*); |
93 | }; | |
93 | } IObjectMethods; | |
94 | 94 | |
95 | struct IObjectVtbl | |
95 | #define IObjectInclusiveMethods IObjectMethods Object | |
96 | ||
97 | typedef struct IObjectVtbl | |
96 | 98 | { |
97 | struct IObjectMethods Object; | |
98 | }; | |
99 | IObjectInclusiveMethods; | |
100 | } IObjectVtbl; | |
99 | 101 | |
100 | 102 | // clang-format on |
101 | 103 |