|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
| ShaderID MayaFlux::Portal::Graphics::ShaderFoundry::load_shader | ( | const std::string & | content, |
| std::optional< ShaderStage > | stage = std::nullopt, |
||
| const std::string & | entry_point = "main" |
||
| ) |
Universal shader loader - auto-detects source type.
| content | File path, GLSL source string, or SPIR-V path |
| stage | Optional stage override (auto-detected if omitted) |
| entry_point | Entry point function name (default: "main") |
Supports:
Stage auto-detection: .comp → COMPUTE .vert → VERTEX .frag → FRAGMENT .geom → GEOMETRY .tesc → TESS_CONTROL .tese → TESS_EVALUATION
Examples: load_shader("shaders/kernel.comp"); // File load_shader("shaders/kernel.spv", COMPUTE); // SPIR-V load_shader("#version 450\nvoid main(){}", COMPUTE); // Source
Definition at line 265 of file ShaderFoundry.cpp.
References compile_from_file(), compile_from_source(), compile_from_spirv(), MayaFlux::Portal::Graphics::COMPUTE, detect_source_type(), detect_stage_from_extension(), MayaFlux::Portal::Graphics::ShaderFoundry::ShaderState::entry_point, FILE_GLSL, FILE_SPIRV, MayaFlux::Portal::Graphics::ShaderFoundry::ShaderState::filepath, generate_source_cache_key(), MayaFlux::Portal::Graphics::INVALID_SHADER, is_initialized(), m_next_shader_id, m_shader_filepath_cache, m_shaders, MF_DEBUG, MF_ERROR, MF_INFO, MayaFlux::Journal::Portal, MayaFlux::Journal::ShaderCompilation, SOURCE_STRING, and MayaFlux::Portal::Graphics::ShaderFoundry::ShaderState::stage.
Referenced by load_shader(), reload_shader(), and MayaFlux::Buffers::RenderProcessor::RenderProcessor().
Here is the call graph for this function:
Here is the caller graph for this function: