mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-12 23:36:09 +01:00
Fix gl error spam
- CrumblingProgram was trying to upload a uniform before the location was queried. - Adjust WorldProgram init to mitigate this in the future.
This commit is contained in:
parent
1da67aaf1a
commit
28a3813652
2 changed files with 3 additions and 8 deletions
|
@ -25,12 +25,6 @@ public class CrumblingProgram extends WorldProgram {
|
|||
uTextureScale = getUniformLocation("uTextureScale");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bind() {
|
||||
super.bind();
|
||||
setDefaultAtlasSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerSamplers() {
|
||||
super.registerSamplers();
|
||||
|
|
|
@ -5,6 +5,7 @@ import static org.lwjgl.opengl.GL20.glUniform3f;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
|
||||
import com.jozufozu.flywheel.backend.loading.Program;
|
||||
import com.jozufozu.flywheel.core.shader.extension.IProgramExtension;
|
||||
import com.jozufozu.flywheel.util.AnimationTickHolder;
|
||||
|
@ -25,9 +26,9 @@ public class WorldProgram extends ExtensibleGlProgram {
|
|||
uViewProjection = getUniformLocation("uViewProjection");
|
||||
uCameraPos = getUniformLocation("uCameraPos");
|
||||
|
||||
bind();
|
||||
super.bind();
|
||||
registerSamplers();
|
||||
unbind();
|
||||
super.unbind();
|
||||
}
|
||||
|
||||
protected void registerSamplers() {
|
||||
|
|
Loading…
Reference in a new issue