From 9da4b78830f168c93862e65c117667b96b5e43b9 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Thu, 10 Sep 2015 23:09:15 -0400 Subject: [PATCH] GLRenderer: disable unused vertex attributes before rendering instead of after --- .../src/main/java/com/jme3/renderer/opengl/GLRenderer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java index 17e9c1055..0aa0d693f 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java @@ -2650,12 +2650,13 @@ public class GLRenderer implements Renderer { } } + clearVertexAttribs(); + if (indices != null) { drawTriangleList(indices, mesh, count); } else { drawTriangleArray(mesh.getMode(), count, mesh.getVertexCount()); } - clearVertexAttribs(); } public void renderMesh(Mesh mesh, int lod, int count, VertexBuffer[] instanceData) {