Implement clipping

This commit is contained in:
2026-09-08 21:15:21 +02:00
parent aec9083ebb
commit 0dbf430c0c
16 changed files with 66 additions and 9 deletions
+5
View File
@@ -43,6 +43,7 @@ PD_API void Drawlist::Clear() {
pPath.ResetFast();
pCommands.NoReset();
pCurrentLayer = 0;
pClipRects.clear();
}
/** Command Allocation */
@@ -51,6 +52,10 @@ PD_API Command& Drawlist::NewCommand() {
cmd->Reset();
cmd->Layer = pCurrentLayer;
cmd->Tex = pCurrentTexture.GetID();
if (HasClipRect()) {
cmd->ClipRectUsed = HasClipRect();
cmd->ClipRect = pClipRects.back();
}
return *cmd;
}