From: frustaci Date: Mon, 15 Apr 2013 03:22:17 +0000 (-0300) Subject: forceVBO in Mesh X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c678b11bca0e60f0211ad5ecada3921a6c6fc356;p=mikumikustudio%2Flibgdx-mikumikustudio.git forceVBO in Mesh At least one recent commit https://github.com/libgdx/libgdx/commit/7020231ca8b1e14995d398603de525581e3d1282 has completely disabled VBO support in the SpriteBatch class for not so clear reasons. My project uses GL20 for now only and I would like to use/test VBOs, so at least there's a way to bring back VBOs in spritebatch by using the forceVBO flag. If someone could clarify why SpriteBatch was changed I would appreciate as well. --- diff --git a/gdx/src/com/badlogic/gdx/graphics/Mesh.java b/gdx/src/com/badlogic/gdx/graphics/Mesh.java index ab6083d5a..74ecf30aa 100644 --- a/gdx/src/com/badlogic/gdx/graphics/Mesh.java +++ b/gdx/src/com/badlogic/gdx/graphics/Mesh.java @@ -176,7 +176,7 @@ public class Mesh implements Disposable { public Mesh (VertexDataType type, boolean isStatic, int maxVertices, int maxIndices, VertexAttribute... attributes) { // if (type == VertexDataType.VertexArray && Gdx.graphics.isGL20Available()) type = VertexDataType.VertexBufferObject; - if (type == VertexDataType.VertexBufferObject) { + if (type == VertexDataType.VertexBufferObject || Mesh.forceVBO) { vertices = new VertexBufferObject(isStatic, maxVertices, attributes); indices = new IndexBufferObject(isStatic, maxIndices); isVertexArray = false;