From 9c4b2d671114f1fc231120c0c4df37ffe72d354b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 3 Oct 2018 16:08:06 +0200 Subject: Camera : add void applyScreenViewport() --- core/src/ch/asynk/gdx/tabletop/Camera.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/ch/asynk/gdx/tabletop/Camera.java b/core/src/ch/asynk/gdx/tabletop/Camera.java index 5d47b81..39c04b9 100644 --- a/core/src/ch/asynk/gdx/tabletop/Camera.java +++ b/core/src/ch/asynk/gdx/tabletop/Camera.java @@ -114,6 +114,11 @@ public class Camera extends OrthographicCamera Matrix4.inv(hudInvProjMatrix.val); } + public void applyScreenViewport() + { + HdpiUtils.glViewport(0, 0, screenWidth, screenHeight); + } + public void applyBoardViewport() { HdpiUtils.glViewport((int)viewport.x, (int)viewport.y, (int)viewport.width, (int)viewport.height); @@ -124,7 +129,7 @@ public class Camera extends OrthographicCamera if (hudInBoard) applyBoardViewport(); else - HdpiUtils.glViewport(0, 0, screenWidth, screenHeight); + applyScreenViewport(); } public void centerOnWorld() -- cgit v1.1-2-g2b99