DiligentGraphics/DiligentCore

Separate API-specific logic in the Archiver

Closed this issue · 0 comments

At the moment all API-specific logic is mixed together in the same files making it a bit messy and unorganized.
It is preferable to have all API-specific logic in separate files. This will make the code more structured, reduce header collision problems.
For example, all D3D11-specific logic can be moved to ArchiverImpl_D3D11.cpp, so that only this file will include D3D11-specific headers. It is OK that it will contain implementations of different classes.
Header files should not contain any API-specific headers.
API-specific implementation files should be included in the build depending on the supported APIs, reducing the number of #if XXX_SUPPORTED branches.