From f6aa1fd72af7f9e4be29895f40e1edb2b5ed454e Mon Sep 17 00:00:00 2001 From: badlogicgames Date: Sun, 5 Dec 2010 05:29:13 +0000 Subject: [PATCH] [changed] SpriteBatch uses vertex arrays if SpriteBatch() or SpriteBatch(int size) constructors are used. Tries to use n-buffered VBOs in case of SpriteBatch(int size, int buffers) is used and falls back to VAs if VBOs are not supported. It's funny that the commit comment is ca. 100x longer than the actual code it took to "implement" that. 20 characters... --- gdx/src/com/badlogic/gdx/graphics/SpriteBatch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdx/src/com/badlogic/gdx/graphics/SpriteBatch.java b/gdx/src/com/badlogic/gdx/graphics/SpriteBatch.java index 2eb5b76fc..77f068785 100644 --- a/gdx/src/com/badlogic/gdx/graphics/SpriteBatch.java +++ b/gdx/src/com/badlogic/gdx/graphics/SpriteBatch.java @@ -145,7 +145,7 @@ public class SpriteBatch { */ public SpriteBatch(int size) { this.buffers = new Mesh[1]; - this.buffers[0] = new Mesh(false, size * 4, size * 6, new VertexAttribute( + this.buffers[0] = new Mesh(VertexDataType.VertexArray, false, size * 4, size * 6, new VertexAttribute( Usage.Position, 2, "a_position"), new VertexAttribute( Usage.ColorPacked, 4, "a_color"), new VertexAttribute( Usage.TextureCoordinates, 2, "a_texCoords")); -- 2.11.0