am be29d82f: Merge "Correctly adjust clip regions that lie offscreen" into jb-mr1-dev
* commit 'be29d82f740fea2ed35d89bd9aa4644f4c042762': Correctly adjust clip regions that lie offscreen
This commit is contained in:
@@ -399,9 +399,20 @@ bool Caches::setScissor(GLint x, GLint y, GLint width, GLint height) {
|
||||
if (scissorEnabled && (x != mScissorX || y != mScissorY ||
|
||||
width != mScissorWidth || height != mScissorHeight)) {
|
||||
|
||||
if (x < 0) x = 0;
|
||||
if (y < 0) y = 0;
|
||||
|
||||
if (x < 0) {
|
||||
width += x;
|
||||
x = 0;
|
||||
}
|
||||
if (y < 0) {
|
||||
height += y;
|
||||
y = 0;
|
||||
}
|
||||
if (width < 0) {
|
||||
width = 0;
|
||||
}
|
||||
if (height < 0) {
|
||||
height = 0;
|
||||
}
|
||||
glScissor(x, y, width, height);
|
||||
|
||||
mScissorX = x;
|
||||
|
||||
Reference in New Issue
Block a user