docs: Update RHI test refactoring status

- Mark P0-1 (Shader) and P0-2 (PipelineState) as completed
- Update test coverage matrix
- Add changelog v1.1
This commit is contained in:
2026-03-25 12:30:05 +08:00
parent f808f8d197
commit 0948e0fdbe
13 changed files with 273 additions and 49 deletions

View File

@@ -33,7 +33,10 @@ void HierarchyPanel::Render() {
ImGui::BeginChild("EntityList");
for (auto* gameObject : EditorSceneManager::Get().GetRootEntities()) {
auto rootEntities = EditorSceneManager::Get().GetRootEntities();
SortEntities(const_cast<std::vector<::XCEngine::Components::GameObject*>&>(rootEntities));
for (auto* gameObject : rootEntities) {
RenderEntity(gameObject, filter);
}
@@ -65,6 +68,13 @@ void HierarchyPanel::Render() {
}
void HierarchyPanel::RenderSearchBar() {
ImGui::SetNextItemWidth(120);
const char* sortLabels[] = { "Name", "Components", "Transform First" };
int currentSort = static_cast<int>(m_sortMode);
if (ImGui::Combo("##Sort", &currentSort, sortLabels, 3)) {
m_sortMode = static_cast<SortMode>(currentSort);
}
ImGui::SameLine();
ImGui::SetNextItemWidth(-1);
ImGui::InputTextWithHint("##Search", "Search...", m_searchBuffer, sizeof(m_searchBuffer));
}
@@ -346,5 +356,30 @@ bool HierarchyPanel::PassesFilter(::XCEngine::Components::GameObject* gameObject
return false;
}
void HierarchyPanel::SortEntities(std::vector<::XCEngine::Components::GameObject*>& entities) {
switch (m_sortMode) {
case SortMode::Name:
std::sort(entities.begin(), entities.end(), [](::XCEngine::Components::GameObject* a, ::XCEngine::Components::GameObject* b) {
return a->GetName() < b->GetName();
});
break;
case SortMode::ComponentCount:
std::sort(entities.begin(), entities.end(), [](::XCEngine::Components::GameObject* a, ::XCEngine::Components::GameObject* b) {
return a->GetComponents<::XCEngine::Components::Component>().size() > b->GetComponents<::XCEngine::Components::Component>().size();
});
break;
case SortMode::TransformFirst:
std::sort(entities.begin(), entities.end(), [](::XCEngine::Components::GameObject* a, ::XCEngine::Components::GameObject* b) {
bool aHasTransform = a->GetComponent<::XCEngine::Components::TransformComponent>() != nullptr;
bool bHasTransform = b->GetComponent<::XCEngine::Components::TransformComponent>() != nullptr;
if (aHasTransform != bHasTransform) {
return aHasTransform;
}
return a->GetName() < b->GetName();
});
break;
}
}
}
}