|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
| bool MayaFlux::Core::VKShaderModule::create_from_glsl_file | ( | vk::Device | device, |
| const std::string & | glsl_path, | ||
| std::optional< vk::ShaderStageFlagBits > | stage = std::nullopt, |
||
| 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 file.
| device | Logical device |
| glsl_path | Path to .comp/.vert/.frag/.geom file |
| stage | Shader stage (auto-detected from extension if not specified) |
| entry_point | Entry point function name |
| enable_reflection | Extract metadata |
| include_directories | Paths for #include resolution |
| defines | Preprocessor definitions |
Reads file, compiles GLSL → SPIR-V, calls create_from_spirv(). Stage auto-detection: .comp → Compute .vert → Vertex .frag → Fragment .geom → Geometry .tesc → Tessellation Control .tese → Tessellation Evaluation
Definition at line 231 of file VKShaderModule.cpp.
References MayaFlux::Journal::Core, create_from_glsl(), detect_stage_from_extension(), MayaFlux::Journal::GraphicsBackend, MF_DEBUG, MF_ERROR, and read_text_file().
Here is the call graph for this function: