From 27f4882fcc9b25a115e2d1159769171b22f17542 Mon Sep 17 00:00:00 2001 From: Natty <31473117+493msi@users.noreply.github.com> Date: Tue, 10 May 2022 01:13:16 +0200 Subject: [PATCH] Used the integrated color buffer clear method --- .../jsr-clone/src/main/java/cz/tefek/srclone/Main.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engine-demo/jsr-clone/src/main/java/cz/tefek/srclone/Main.java b/engine-demo/jsr-clone/src/main/java/cz/tefek/srclone/Main.java index 1fe7a69..cac3617 100644 --- a/engine-demo/jsr-clone/src/main/java/cz/tefek/srclone/Main.java +++ b/engine-demo/jsr-clone/src/main/java/cz/tefek/srclone/Main.java @@ -36,6 +36,7 @@ import org.plutoengine.libra.text.shaping.TextStyleOptions; import org.plutoengine.math.ProjectionMatrix; import org.plutoengine.graphics.shader.uniform.auto.AutomaticUniforms; import org.plutoengine.util.color.Color; +import org.plutoengine.util.color.RGBA; import java.util.concurrent.TimeUnit; @@ -47,6 +48,7 @@ public class Main extends PlutoApplication var cfg = new PlutoApplication.StartupConfig(); cfg.windowInitialDimensions(1280, 720); cfg.windowName("jsr-clone"); + cfg.clearColor(new RGBA(0.0f, 0.0f, 0.0f, 1.0f)); // cfg.vsync(1); app.run(args, cfg); } @@ -71,9 +73,6 @@ public class Main extends PlutoApplication GL33.glEnable(GL33.GL_BLEND); GL33.glBlendFunc(GL33.GL_SRC_ALPHA, GL33.GL_ONE_MINUS_SRC_ALPHA); - GL33.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - GL33.glClear(GL33.GL_COLOR_BUFFER_BIT); - var projection = ProjectionMatrix.createOrtho2D(this.display.getWidth(), this.display.getHeight()); AutomaticUniforms.VIEWPORT_PROJECTION.fire(projection);