diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2018-10-03 16:08:06 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2018-10-03 16:08:06 +0200 |
commit | 9c4b2d671114f1fc231120c0c4df37ffe72d354b (patch) | |
tree | c3c465f776d504439e75ce2726f21615e544a1cb | |
parent | db354c256d9f81d369219cfce580dea8cb0e49f8 (diff) | |
download | gdx-boardgame-9c4b2d671114f1fc231120c0c4df37ffe72d354b.zip gdx-boardgame-9c4b2d671114f1fc231120c0c4df37ffe72d354b.tar.gz |
Camera : add void applyScreenViewport()
-rw-r--r-- | core/src/ch/asynk/gdx/tabletop/Camera.java | 7 |
1 files changed, 6 insertions, 1 deletions
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() |