yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Ellie Hermaszewskaformatf65d756bf

master
1.3 KiB41 linesraw
1#ifndef SLANG_CORE_ARCHIVE_FILE_SYSTEM_H
2#define SLANG_CORE_ARCHIVE_FILE_SYSTEM_H
3
4#include "slang-basic.h"
5#include "slang-com-ptr.h"
6#include "slang-compression-system.h"
7
8namespace Slang
9{
10
11class IArchiveFileSystem : public ISlangCastable
12{
13    SLANG_COM_INTERFACE(
14        0x5c565aac,
15        0xe834,
16        0x41fc,
17        {0x8b, 0xb, 0x7d, 0x4c, 0xf3, 0x8b, 0x89, 0x50});
18
19    /// Loads an archive.
20    SLANG_NO_THROW virtual SlangResult SLANG_MCALL
21    loadArchive(const void* archive, size_t archiveSizeInBytes) = 0;
22    /// Get as an archive (that can be saved to disk)
23    /// NOTE! If the blob is not owned, it's contents can be invalidated by any call to a method of
24    /// the file system or loss of scope
25    SLANG_NO_THROW virtual SlangResult SLANG_MCALL
26    storeArchive(bool blobOwnsContent, ISlangBlob** outBlob) = 0;
27    /// Set the compression - used for any subsequent items added
28    SLANG_NO_THROW virtual void SLANG_MCALL setCompressionStyle(const CompressionStyle& style) = 0;
29};
30
31SlangResult loadArchiveFileSystem(
32    const void* data,
33    size_t dataSizeInBytes,
34    ComPtr<ISlangFileSystemExt>& outFileSystem);
35SlangResult createArchiveFileSystem(
36    SlangArchiveType type,
37    ComPtr<ISlangMutableFileSystem>& outFileSystem);
38
39} // namespace Slang
40
41#endif