Closed DiligentGraphics closed 4 years ago
@neslib I also reworked IShaderSourceInputStreamFactory
(https://github.com/DiligentGraphics/DiligentCore/commit/696a3cbb5a5f30d2f5000c0db90125d614ea09ca; main repo: https://github.com/DiligentGraphics/DiligentEngine/commit/ea0c5eacdd91a1c17502eb2ba36093ac054572ce): the interface is now derived from IObject
. Default shader source stream factory can be created by the engine factory. Engine factory can be queried from the device, or you can keep pointer to original factory. I guess this should fix most of your issues.
Speaking about IDataBlob
and DataBlobImpl
, I am not really sure where you would really need these.
If you want to implement Diligent interfaces, you can simply return null from GetReferenceCounters
method. The method is only used when creating weak references and there are only few places in the engine where they are used.
BTW, speaking about functions returning interfaces, I guess what is likely happening is Delphi thinks that AddRef
was called and calls Release
. However by convention Diligent only increments reference counter when interface is returned as out parameter of a function. This would explain why it works when you cast return value to raw pointer.
Closing the issue for now. @neslib feel free to reopen/create a new one if there is still interest.
Continuing #55:
Thanks! This fixes the issue with the wrong vtable order with VC++.
Thanks for doing this so quickly. Works like a charm...