TINYGL: Make scissors follow Common::Rect semantics.

As per Common::Rect data model, right and bottom border are excluded, so:
- Make FrameBuffer::scissorPixel reject bottom & right borders.
- Update bounding rectangle definition for dirty rectangle operations
  ClearBufferDrawCall::getDirtyRegion is already correct.
- zblit was almost following, except for an off-by-one mistake.
This commit is contained in:
Vincent Pelletier 2016-07-22 06:19:41 +02:00
parent 3acde7d900
commit e1de3407f1
3 changed files with 8 additions and 24 deletions

View file

@ -163,13 +163,13 @@ public:
return false;
}
if (dstX + width > c->_scissorRect.right) {
if (dstX + width >= c->_scissorRect.right) {
clampWidth = c->_scissorRect.right - dstX;
} else {
clampWidth = width;
}
if (dstY + height > c->_scissorRect.bottom) {
if (dstY + height >= c->_scissorRect.bottom) {
clampHeight = c->_scissorRect.bottom - dstY;
} else {
clampHeight = height;