Clamp pixelator FBO size
This commit is contained in:
@@ -5,6 +5,7 @@ import arc.graphics.*;
|
|||||||
import arc.graphics.Texture.*;
|
import arc.graphics.Texture.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.graphics.gl.*;
|
import arc.graphics.gl.*;
|
||||||
|
import arc.math.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
|
|
||||||
import static arc.Core.*;
|
import static arc.Core.*;
|
||||||
@@ -35,6 +36,8 @@ public class Pixelator implements Disposable{
|
|||||||
w = (int)(Core.camera.width * renderer.landScale() / renderer.getScale());
|
w = (int)(Core.camera.width * renderer.landScale() / renderer.getScale());
|
||||||
h = (int)(Core.camera.height * renderer.landScale() / renderer.getScale());
|
h = (int)(Core.camera.height * renderer.landScale() / renderer.getScale());
|
||||||
}
|
}
|
||||||
|
w = Mathf.clamp(w, 2, graphics.getWidth());
|
||||||
|
h = Mathf.clamp(h, 2, graphics.getHeight());
|
||||||
|
|
||||||
buffer.resize(w, h);
|
buffer.resize(w, h);
|
||||||
|
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ android.useAndroidX=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=a40808f513dd04b3f3877595456d7e112b5ae4bd
|
archash=4dd14bbdaa7f75354c4a24345f9da05af34a3081
|
||||||
|
|||||||
Reference in New Issue
Block a user