|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
| bool MayaFlux::Core::VKShaderModule::create_from_glsl | ( | vk::Device | device, |
| const std::string & | glsl_source, | ||
| vk::ShaderStageFlagBits | stage, | ||
| const std::string & | entry_point = "main", |
||
| bool | enable_reflection = true, |
||
| const std::vector< std::string > & | include_directories = {}, |
||
| const std::unordered_map< std::string, std::string > & | defines = {} |
||
| ) |
Create shader module from GLSL source string.
| device | Logical device |
| glsl_source | GLSL source code |
| stage | Shader stage (determines compiler mode) |
| entry_point | Entry point function name |
| enable_reflection | Extract metadata |
| include_directories | Paths for #include resolution |
| defines | Preprocessor definitions (e.g., {"DEBUG", "MAX_LIGHTS=4"}) |
Compiles GLSL → SPIR-V using shaderc, then calls create_from_spirv(). Requires shaderc library to be available.
Definition at line 208 of file VKShaderModule.cpp.
References compile_glsl_to_spirv(), MayaFlux::Journal::Core, create_from_spirv(), MayaFlux::Journal::GraphicsBackend, MF_DEBUG, and MF_ERROR.
Referenced by create_from_glsl_file().
Here is the call graph for this function:
Here is the caller graph for this function: