diff options
| author | Yong He <yonghe@outlook.com> | 2025-01-31 05:02:26 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-31 21:02:26 +0800 |
| commit | eebe849075c21d163739cbc5e976e7b5b6837e7f (patch) | |
| tree | ec3fd562da49385fbd5d4a6deebac78b9fe74c09 /source/slang-glsl-module/slang-embedded-glsl-module.cpp | |
| parent | ae778e3424b39cbeb1f367339f654560de416d30 (diff) | |
Distribute slang-glsl-module.bin in release packages. (#6233)
* Distribute slang-glsl-module.bin in release packages.
* Fix.
* fix2.
* Build glsl modlue into a dll.
Diffstat (limited to 'source/slang-glsl-module/slang-embedded-glsl-module.cpp')
| -rw-r--r-- | source/slang-glsl-module/slang-embedded-glsl-module.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/slang-glsl-module/slang-embedded-glsl-module.cpp b/source/slang-glsl-module/slang-embedded-glsl-module.cpp new file mode 100644 index 000000000..7435f1edb --- /dev/null +++ b/source/slang-glsl-module/slang-embedded-glsl-module.cpp @@ -0,0 +1,17 @@ +#include "../core/slang-array-view.h" +#include "../core/slang-basic.h" +#include "../core/slang-blob.h" + +static const uint8_t g_glslModule[] = { +#include "slang-glsl-module-generated.h" +}; + +static Slang::StaticBlob g_glslModuleBlob((const void*)g_glslModule, sizeof(g_glslModule)); + +extern "C" +{ + SLANG_DLL_EXPORT ISlangBlob* slang_getEmbeddedModule() + { + return &g_glslModuleBlob; + } +} |
