refactor(rendering): formalize pipeline selection and engine asset discovery

This commit is contained in:
2026-04-19 04:31:48 +08:00
parent 78bcd2e9ca
commit 48bfde28e3
17 changed files with 294 additions and 121 deletions

View File

@@ -11,7 +11,8 @@ namespace ProjectGraphicsSettings {
inline ProjectFileUtils::GraphicsSettingsDescriptor BuildDescriptor(
const ::XCEngine::Rendering::GraphicsSettingsState& state) {
ProjectFileUtils::GraphicsSettingsDescriptor descriptor;
const auto nativeDescriptor = state.GetRenderPipelineAssetDescriptor();
const auto nativeDescriptor =
state.GetConfiguredRenderPipelineAssetDescriptor();
if (nativeDescriptor.IsValid()) {
descriptor.renderPipelineAssetAssembly = nativeDescriptor.assemblyName;
descriptor.renderPipelineAssetNamespace =
@@ -33,7 +34,7 @@ inline bool SaveSelection(
inline void ApplySelection(
const std::string& projectRoot,
::XCEngine::Rendering::GraphicsSettingsState& state) {
state.ClearRenderPipelineAssetDescriptor();
state.ClearConfiguredRenderPipelineAssetDescriptor();
if (projectRoot.empty()) {
return;
@@ -53,7 +54,7 @@ inline void ApplySelection(
savedDescriptor->renderPipelineAssetNamespace;
nativeDescriptor.className = savedDescriptor->renderPipelineAssetClass;
if (nativeDescriptor.IsValid()) {
state.SetRenderPipelineAssetDescriptor(nativeDescriptor);
state.SetConfiguredRenderPipelineAssetDescriptor(nativeDescriptor);
}
}