mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- fixed: The scissor rectangle must be clipped to the upper left edge of the screen.
Negative coordinates are treated as "disable scissor", so if some transformation results in something off-screen it needs to be handled before passing it to the backend.
This commit is contained in:
parent
3e7061036a
commit
95c232d31a
2 changed files with 3 additions and 1 deletions
|
@ -150,6 +150,9 @@ void Draw2D(F2DDrawer *drawer, FRenderState &state)
|
|||
sciY = screen->ScreenToWindowY(cmd.mScissor[3]);
|
||||
sciW = screen->ScreenToWindowX(cmd.mScissor[2]) - sciX;
|
||||
sciH = screen->ScreenToWindowY(cmd.mScissor[1]) - sciY;
|
||||
// If coordinates turn out negative, clip to sceen here to avoid undefined behavior.
|
||||
if (sciX < 0) sciW += sciX, sciX = 0;
|
||||
if (sciY < 0) sciH += sciY, sciY = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -11,7 +11,6 @@ class FxAddSub;
|
|||
struct BuildInfo;
|
||||
class FMultipatchTextureBuilder;
|
||||
class FScanner;
|
||||
int PalCheck(int tex);
|
||||
|
||||
// Texture manager
|
||||
class FTextureManager
|
||||
|
|
Loading…
Reference in a new issue