MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ detect_source_type()

ShaderFoundry::DetectedSourceType MayaFlux::Portal::Graphics::ShaderFoundry::detect_source_type ( const std::string &  content) const
private

Definition at line 383 of file ShaderFoundry.cpp.

384{
385 auto resolved_path = resolve_shader_path(content);
386
387 if (resolved_path.has_value()) {
388 std::string ext = resolved_path->extension().string();
389 std::ranges::transform(ext, ext.begin(), ::tolower);
390
391 if (ext == ".spv") {
393 }
394
396 }
397
398 if (content.size() > 1024 || content.find('\n') != std::string::npos) {
400 }
401
403}
std::optional< std::filesystem::path > resolve_shader_path(const std::string &filepath) const

References FILE_GLSL, FILE_SPIRV, resolve_shader_path(), and SOURCE_STRING.

Referenced by load_shader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: