From 13fbbbc4ad77a9fb8f5951502e7ed2efa05278f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 8 Oct 2018 14:20:03 +0200 Subject: AbstractScreen : the screen set the glViewport at construction --- test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java b/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java index d0929ee..767a4ea 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java @@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.Camera; import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.glutils.HdpiUtils; import com.badlogic.gdx.Input; import com.badlogic.gdx.InputAdapter; import com.badlogic.gdx.InputMultiplexer; @@ -48,6 +49,8 @@ public abstract class AbstractScreen implements Screen this.inputBlocked = false; this.inputDelay = 0f; this.paused = false; + + HdpiUtils.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); } protected abstract void draw(SpriteBatch batch); -- cgit v1.1-2-g2b99