From: badlogicgames Date: Tue, 2 Nov 2010 00:20:00 +0000 (+0000) Subject: ["fixed"] resize stuff. not really working as expected in particle editor. and hiero... X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0df85d57d94ea970b70400a793b7bffd72dcad70;p=mikumikustudio%2Flibgdx-mikumikustudio.git ["fixed"] resize stuff. not really working as expected in particle editor. and hiero shows some nice shitty textures :p --- diff --git a/extensions/hiero/src/com/badlogic/gdx/hiero/Hiero.java b/extensions/hiero/src/com/badlogic/gdx/hiero/Hiero.java index 039533dff..a7b2df544 100644 --- a/extensions/hiero/src/com/badlogic/gdx/hiero/Hiero.java +++ b/extensions/hiero/src/com/badlogic/gdx/hiero/Hiero.java @@ -1180,8 +1180,7 @@ public class Hiero extends JFrame { int viewHeight = Gdx.graphics.getHeight(); if (viewWidth != glCanvas.getWidth() || viewHeight != glCanvas.getHeight()) { viewWidth = Math.max(1, glCanvas.getWidth()); - viewHeight = Math.max(1, glCanvas.getHeight()); - app.setSize(viewWidth, viewHeight); + viewHeight = Math.max(1, glCanvas.getHeight()); } if (newUnicodeFont != null) { diff --git a/extensions/particle-editor/src/com/badlogic/gdx/graphics/particles/ParticleEditor.java b/extensions/particle-editor/src/com/badlogic/gdx/graphics/particles/ParticleEditor.java index 0369f3a9a..d18334d3d 100644 --- a/extensions/particle-editor/src/com/badlogic/gdx/graphics/particles/ParticleEditor.java +++ b/extensions/particle-editor/src/com/badlogic/gdx/graphics/particles/ParticleEditor.java @@ -256,6 +256,7 @@ public class ParticleEditor extends JFrame { @Override public void resize(int width, int height) { + Gdx.gl.glViewport(0, 0, width, height); spriteBatch.getProjectionMatrix().setToOrtho(0, width, height, 0, 0, 1); synchronized (effect) { @@ -269,8 +270,7 @@ public class ParticleEditor extends JFrame { int viewHeight = Gdx.graphics.getHeight(); if (viewWidth != glCanvas.getWidth() || viewHeight != glCanvas.getHeight()) { viewWidth = Math.max(1, glCanvas.getWidth()); - viewHeight = Math.max(1, glCanvas.getHeight()); - app.setSize(viewWidth, viewHeight); + viewHeight = Math.max(1, glCanvas.getHeight()); } float delta = Gdx.graphics.getDeltaTime();