OSDN Git Service

[added] RotationTest for issue 120.
authorbadlogicgames <badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Tue, 8 Feb 2011 18:58:28 +0000 (18:58 +0000)
committerbadlogicgames <badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Tue, 8 Feb 2011 18:58:28 +0000 (18:58 +0000)
tests/gdx-tests-android/assets/data/black_marked_0.png [new file with mode: 0644]
tests/gdx-tests-jogl/data/black_marked_0.png [new file with mode: 0644]
tests/gdx-tests-lwjgl/data/black_marked_0.png [new file with mode: 0644]
tests/gdx-tests/src/com/badlogic/gdx/tests/RotationTest.java [new file with mode: 0644]
tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java

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 (file)
index 0000000..7020ee3
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 (file)
index 0000000..7020ee3
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 (file)
index 0000000..7020ee3
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 (file)
index 0000000..e08234e
--- /dev/null
@@ -0,0 +1,30 @@
+package com.badlogic.gdx.tests;\r
+\r
+import com.badlogic.gdx.Gdx;\r
+import com.badlogic.gdx.graphics.GL10;\r
+import com.badlogic.gdx.graphics.Texture;\r
+import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
+import com.badlogic.gdx.tests.utils.GdxTest;\r
+\r
+public class RotationTest extends GdxTest {\r
+\r
+       @Override public boolean needsGL20 () {\r
+               return false;\r
+       }\r
+       \r
+       Texture texture;\r
+       SpriteBatch batch;\r
+       \r
+       \r
+       @Override public void create() {\r
+               texture = new Texture(Gdx.files.internal("data/black_marked_0.png"));\r
+               batch = new SpriteBatch();\r
+       }\r
+       \r
+       @Override public void render() {\r
+               Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
+               batch.begin();\r
+               batch.draw(texture, 100.5f, 100.5f);\r
+               batch.end();\r
+       }\r
+}\r
index 0eeddf3..a709baa 100644 (file)
@@ -54,6 +54,7 @@ import com.badlogic.gdx.tests.PixelsPerInchTest;
 import com.badlogic.gdx.tests.PixmapBlendingTest;\r
 import com.badlogic.gdx.tests.PixmapTest;\r
 import com.badlogic.gdx.tests.Pong;\r
+import com.badlogic.gdx.tests.RotationTest;\r
 import com.badlogic.gdx.tests.ShaderMultitextureTest;\r
 import com.badlogic.gdx.tests.SimpleTest;\r
 import com.badlogic.gdx.tests.SoundTest;\r
@@ -96,6 +97,7 @@ public class GdxTests
 {\r
        public static final Class[] tests = {   \r
                PixmapTest.class,\r
+               RotationTest.class,\r
                Gdx2DTest.class,                                                \r
                ActionTest.class,\r
                AlphaTest.class,        \r