diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-26 06:52:53 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-26 06:52:53 +0000 |
| commit | 875fbd7069983334921059fdb4dead7e46a86ca8 (patch) | |
| tree | 6f2647d3bbda85ad7b768184e99dc8826a16d344 /Graphics/GraphicsEngine | |
| parent | Reworked IShader::GetResource to be compatible with C; renamed the method to ... (diff) | |
| download | DiligentCore-875fbd7069983334921059fdb4dead7e46a86ca8.tar.gz DiligentCore-875fbd7069983334921059fdb4dead7e46a86ca8.zip | |
Fixed Sampler c interface; added test. Also fixed issue in shader C interface
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/interface/Sampler.h | 15 | ||||
| -rw-r--r-- | Graphics/GraphicsEngine/interface/Shader.h | 4 |
2 files changed, 12 insertions, 7 deletions
diff --git a/Graphics/GraphicsEngine/interface/Sampler.h b/Graphics/GraphicsEngine/interface/Sampler.h index 4a141548..9493106e 100644 --- a/Graphics/GraphicsEngine/interface/Sampler.h +++ b/Graphics/GraphicsEngine/interface/Sampler.h @@ -191,18 +191,23 @@ public: struct ISampler; -//struct ISamplerVtbl +//struct ISamplerMethods //{ //}; +struct ISamplerVtbl +{ + struct IObjectMethods Object; + struct IDeviceObjectMethods DeviceObject; + //struct ISamplerMethods Sampler; +}; + struct ISampler { - struct IObjectVtbl* pObjectVtbl; - struct IDeviceObjectVtbl* pDeviceObjectVtbl; - //struct ISampler* pSamplerVtbl; + struct ISamplerVtbl* pVtbl; }; -# define ISampler_GetDesc(This) (const struct SamplerDesc*)(This)->pDeviceObjectVtbl->GetDesc(This) +# define ISampler_GetDesc(This) (const struct SamplerDesc*)IDeviceObject_GetDesc(This) #endif diff --git a/Graphics/GraphicsEngine/interface/Shader.h b/Graphics/GraphicsEngine/interface/Shader.h index 876fe897..e472852f 100644 --- a/Graphics/GraphicsEngine/interface/Shader.h +++ b/Graphics/GraphicsEngine/interface/Shader.h @@ -313,8 +313,8 @@ struct IShader; struct IShaderMethods { - Uint32 (*GetResourceCount)(struct IShader*); - struct ShaderResourceDesc (*GetResourceDesc) (struct IShader*, Uint32 Index); + Uint32 (*GetResourceCount)(struct IShader*); + void (*GetResourceDesc) (struct IShader*, Uint32 Index, struct ShaderResourceDesc* ResourceDesc); }; // clang-format on |
