--- /dev/null
+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.Mesh;\r
+import com.badlogic.gdx.graphics.VertexAttribute;\r
+import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
+import com.badlogic.gdx.tests.utils.GdxTest;\r
+\r
+public class MyFirstTriangle extends GdxTest {\r
+ private Mesh mesh;\r
+\r
+ @Override\r
+ public void create() {\r
+ if (mesh == null) {\r
+ mesh = new Mesh(true, 3, 3, \r
+ new VertexAttribute(Usage.Position, 3, "a_position")); \r
+\r
+ mesh.setVertices(new float[] { -0.5f, -0.5f, 0,\r
+ 0.5f, -0.5f, 0,\r
+ 0, 0.5f, 0 }); \r
+ mesh.setIndices(new short[] { 0, 1, 2 }); \r
+ }\r
+ }\r
+\r
+ @Override\r
+ public void dispose() { }\r
+\r
+ @Override\r
+ public void pause() { }\r
+\r
+ @Override\r
+ public void render() {\r
+ Gdx.gl10.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
+ mesh.render(GL10.GL_TRIANGLES, 0, 3);\r
+ }\r
+\r
+ @Override\r
+ public void resize(int width, int height) { }\r
+\r
+ @Override\r
+ public void resume() { }\r
+\r
+ @Override\r
+ public boolean needsGL20() {\r
+ // TODO Auto-generated method stub\r
+ return false;\r
+ }\r
+}
\ No newline at end of file
import com.badlogic.gdx.tests.MeshTest;\r
import com.badlogic.gdx.tests.Mpg123Test;\r
import com.badlogic.gdx.tests.MultitouchTest;\r
+import com.badlogic.gdx.tests.MyFirstTriangle;\r
import com.badlogic.gdx.tests.ObjTest;\r
import com.badlogic.gdx.tests.ParticleEmitterTest;\r
import com.badlogic.gdx.tests.PixelsPerInchTest;\r
MeshTest.class,\r
Mpg123Test.class,\r
MultitouchTest.class,\r
+ MyFirstTriangle.class,\r
ObjTest.class,\r
ParticleEmitterTest.class,\r
PixelsPerInchTest.class,\r