recalculating size ratio every frame for now... callbacks too complicated

This commit is contained in:
DaniTheSkunk 2022-12-13 09:32:51 +00:00
parent aa68958a77
commit 0323799a85
1 changed files with 1 additions and 2 deletions

View File

@ -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() {