From: badlogicgames Date: Tue, 8 Feb 2011 18:58:28 +0000 (+0000) Subject: [added] RotationTest for issue 120. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e8684bd512dff4c35d17cfa6cbde5e9f62259b4b;p=mikumikustudio%2Flibgdx-mikumikustudio.git [added] RotationTest for issue 120. --- diff --git a/tests/gdx-tests-android/assets/data/black_marked_0.png b/tests/gdx-tests-android/assets/data/black_marked_0.png new file mode 100644 index 000000000..7020ee3df Binary files /dev/null and b/tests/gdx-tests-android/assets/data/black_marked_0.png differ diff --git a/tests/gdx-tests-jogl/data/black_marked_0.png b/tests/gdx-tests-jogl/data/black_marked_0.png new file mode 100644 index 000000000..7020ee3df Binary files /dev/null and b/tests/gdx-tests-jogl/data/black_marked_0.png differ diff --git a/tests/gdx-tests-lwjgl/data/black_marked_0.png b/tests/gdx-tests-lwjgl/data/black_marked_0.png new file mode 100644 index 000000000..7020ee3df Binary files /dev/null and b/tests/gdx-tests-lwjgl/data/black_marked_0.png differ diff --git a/tests/gdx-tests/src/com/badlogic/gdx/tests/RotationTest.java b/tests/gdx-tests/src/com/badlogic/gdx/tests/RotationTest.java new file mode 100644 index 000000000..e08234e55 --- /dev/null +++ b/tests/gdx-tests/src/com/badlogic/gdx/tests/RotationTest.java @@ -0,0 +1,30 @@ +package com.badlogic.gdx.tests; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.GL10; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.tests.utils.GdxTest; + +public class RotationTest extends GdxTest { + + @Override public boolean needsGL20 () { + return false; + } + + Texture texture; + SpriteBatch batch; + + + @Override public void create() { + texture = new Texture(Gdx.files.internal("data/black_marked_0.png")); + batch = new SpriteBatch(); + } + + @Override public void render() { + Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); + batch.begin(); + batch.draw(texture, 100.5f, 100.5f); + batch.end(); + } +} diff --git a/tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java b/tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java index 0eeddf332..a709baa94 100644 --- a/tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java +++ b/tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java @@ -54,6 +54,7 @@ import com.badlogic.gdx.tests.PixelsPerInchTest; import com.badlogic.gdx.tests.PixmapBlendingTest; import com.badlogic.gdx.tests.PixmapTest; import com.badlogic.gdx.tests.Pong; +import com.badlogic.gdx.tests.RotationTest; import com.badlogic.gdx.tests.ShaderMultitextureTest; import com.badlogic.gdx.tests.SimpleTest; import com.badlogic.gdx.tests.SoundTest; @@ -96,6 +97,7 @@ public class GdxTests { public static final Class[] tests = { PixmapTest.class, + RotationTest.class, Gdx2DTest.class, ActionTest.class, AlphaTest.class,