diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-27 02:36:20 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-27 02:36:20 +0000 |
| commit | 30c692d094830a9e3de9c747ba31919f48ac4c52 (patch) | |
| tree | 42466de3177907a6496577a28302ae7385038bb6 /Graphics/GraphicsEngine | |
| parent | Fixed fence C inteface; added test. (diff) | |
| download | DiligentCore-30c692d094830a9e3de9c747ba31919f48ac4c52.tar.gz DiligentCore-30c692d094830a9e3de9c747ba31919f48ac4c52.zip | |
Added Engine factory c interface
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/interface/EngineFactory.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngine/interface/EngineFactory.h b/Graphics/GraphicsEngine/interface/EngineFactory.h index 3ea4efcc..eab3d9e8 100644 --- a/Graphics/GraphicsEngine/interface/EngineFactory.h +++ b/Graphics/GraphicsEngine/interface/EngineFactory.h @@ -67,6 +67,44 @@ public: #else +struct IEngineFactory; +struct IShaderSourceInputStreamFactory; + +// clang-format off + +struct IEngineFactoryMethods +{ + const struct APIInfo* (*GetAPIInfo) (struct IEngineFactory*); + void (*CreateDefaultShaderSourceStreamFactory)(struct IEngineFactory*, + const Char* SearchDirectories, + struct IShaderSourceInputStreamFactory** ppShaderSourceFactory); + +# if PLATFORM_ANDROID + void (*InitAndroidFileSystem) (struct IEngineFactory*, void* Activity, const char* ActivityClassName); +# endif +}; + +// clang-format on + +struct IEngineFactoryVtbl +{ + struct IObjectMethods Object; + struct IEngineFactoryMethods EngineFactory; +}; + +struct IEngineFactory +{ + struct IEngineFactoryVtbl* pVtbl; +}; + +// clang-format off + +# define IEngineFactory_GetAPIInfo(This) (This)->pVtbl->EngineFactory.GetAPIInfo ((struct IEngineFactory*)(This)) +# define IEngineFactory_CreateDefaultShaderSourceStreamFactory(This, ...) (This)->pVtbl->EngineFactory.CreateDefaultShaderSourceStreamFactory((struct IEngineFactory*)(This), __VA_ARGS__) +# define IEngineFactory_InitAndroidFileSystem(This, ...) (This)->pVtbl->EngineFactory.InitAndroidFileSystem ((struct IEngineFactory*)(This), __VA_ARGS__) + +// clang-format on + #endif DILIGENT_END_NAMESPACE // namespace Diligent |
