recalculating size ratio every frame for now... callbacks too complicated
This commit is contained in:
parent
aa68958a77
commit
0323799a85
|
@ -23,6 +23,7 @@ public abstract class Filter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void apply() {
|
public void apply() {
|
||||||
|
calcSizeRatio();
|
||||||
output.bind();
|
output.bind();
|
||||||
input.bindTexture();
|
input.bindTexture();
|
||||||
program.use();
|
program.use();
|
||||||
|
@ -53,7 +54,6 @@ public abstract class Filter {
|
||||||
if(!resizing) {
|
if(!resizing) {
|
||||||
output.setSize(input.getSize());
|
output.setSize(input.getSize());
|
||||||
}
|
}
|
||||||
calcSizeRatio();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOutputSize(Vec2i size) {
|
public void setOutputSize(Vec2i size) {
|
||||||
|
@ -61,7 +61,6 @@ public abstract class Filter {
|
||||||
throw new RuntimeException("this filter doesn't allow output resizing");
|
throw new RuntimeException("this filter doesn't allow output resizing");
|
||||||
}
|
}
|
||||||
output.setSize(size);
|
output.setSize(size);
|
||||||
calcSizeRatio();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calcSizeRatio() {
|
private void calcSizeRatio() {
|
||||||
|
|
Loading…
Reference in New Issue