feat: add explicit camera stack ordering

This commit is contained in:
2026-04-01 13:10:32 +08:00
parent f80fb9860e
commit a908e61ecb
6 changed files with 100 additions and 5 deletions

View File

@@ -44,6 +44,7 @@ void CameraComponent::Serialize(std::ostream& os) const {
os << "depth=" << m_depth << ";";
os << "primary=" << (m_primary ? 1 : 0) << ";";
os << "clearMode=" << static_cast<int>(m_clearMode) << ";";
os << "stackType=" << static_cast<int>(m_stackType) << ";";
os << "cullingMask=" << m_cullingMask << ";";
os << "viewportRect=" << m_viewportRect.x << "," << m_viewportRect.y << "," << m_viewportRect.width << "," << m_viewportRect.height << ";";
os << "clearColor=" << m_clearColor.r << "," << m_clearColor.g << "," << m_clearColor.b << "," << m_clearColor.a << ";";
@@ -80,6 +81,8 @@ void CameraComponent::Deserialize(std::istream& is) {
m_primary = (std::stoi(value) != 0);
} else if (key == "clearMode") {
m_clearMode = static_cast<CameraClearMode>(std::stoi(value));
} else if (key == "stackType") {
m_stackType = static_cast<CameraStackType>(std::stoi(value));
} else if (key == "cullingMask") {
m_cullingMask = static_cast<uint32_t>(std::stoul(value));
} else if (key == "viewportRect") {