[Feat] (...): Implement scissor box in frontend and backend.

This commit is contained in:
BZLZHH
2025-11-01 16:40:38 +08:00
parent 708db4b5eb
commit bcb947235d
7 changed files with 64 additions and 30 deletions
@@ -39,6 +39,9 @@ namespace MobileGL {
case CapabilityInput::CullFace:
m_cullFaceEnabled = enabled;
break;
case CapabilityInput::ScissorTest:
m_scissorTestEnabled = enabled;
break;
default: // not supported currently
break;
}
@@ -52,6 +55,8 @@ namespace MobileGL {
return m_depthTestEnabled;
case CapabilityInput::CullFace:
return m_cullFaceEnabled;
case CapabilityInput::ScissorTest:
return m_scissorTestEnabled;
default:
return false;
}
@@ -134,6 +139,15 @@ namespace MobileGL {
CullFaceMode RenderState::GetCullFaceMode() const {
return m_cullFaceMode;
}
// --------------------- Scissor ---------------------
void RenderState::SetScissorBox(IntVec4 box) {
m_scissorBox = box;
}
const IntVec4& RenderState::GetScissorBox() const {
return m_scissorBox;
}
} // namespace GLState
} // namespace MG_State
} // namespace MobileGL