Files
XCEngine/engine/Runtime/Resources/Shader/ShaderSourceUtils.h

43 lines
1.4 KiB
C++

#pragma once
#include <XCEngine/Core/Containers/String.h>
#include "Shader.h"
#include <string>
namespace XCEngine {
namespace Resources {
std::string ToStdString(const Containers::String& value);
size_t SkipWhitespace(const std::string& text, size_t pos);
std::string TrimCopy(const std::string& text);
bool ParseQuotedString(
const std::string& text,
size_t quotePos,
Containers::String& outValue,
size_t* nextPos = nullptr);
bool TryParseShaderType(const Containers::String& value, ShaderType& outType);
bool TryParseShaderLanguage(const Containers::String& value, ShaderLanguage& outLanguage);
bool TryParseShaderBackend(const Containers::String& value, ShaderBackend& outBackend);
bool TryParseShaderPropertyType(const Containers::String& value, ShaderPropertyType& outType);
bool TryParseShaderResourceType(const Containers::String& value, ShaderResourceType& outType);
Containers::String ResolveShaderDependencyPath(
const Containers::String& dependencyPath,
const Containers::String& sourcePath);
Containers::String BuildShaderDependencyResolutionDiagnostic(
const Containers::String& dependencyPath,
const Containers::String& sourcePath,
const Containers::String& includeChain = Containers::String());
Containers::String ResolveBuiltinShaderPackageDependencyPath(
const Containers::String& dependencyPath);
} // namespace Resources
} // namespace XCEngine