yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
b16eb592c
master
1// glslang-module.h 2#pragma once 3 4#include "core/slang-list.h" 5#include "slang-com-helper.h" 6#include "slang-com-ptr.h" 7#include "slang-glslang/slang-glslang.h" 8#include "slang.h" 9#include "spirv-tools/include/spirv-tools/linker.hpp" 10 11namespace gfx 12{ 13 14struct GlslangModule 15{ 16/// true if has been initialized 17SLANG_FORCE_INLINE bool isInitialized ()const {return m_module != nullptr; } 18 19/// Initialize 20Slang ::Result init (); 21 22/// Destroy 23void destroy (); 24 25/// Dtor 26 ~GlslangModule () {destroy (); } 27 28Slang ::ComPtr < ISlangBlob > linkSPIRV (Slang ::List < Slang ::ComPtr < ISlangBlob >>spirvModules ); 29 30protected : 31void * m_module = nullptr ; 32 33glslang_LinkSPIRVFunc m_linkSPIRVFunc = nullptr ; 34}; 35 36}// namespace gfx