GLRenderer: disable unused vertex attributes before rendering instead of after

experimental
Kirill Vainer 9 years ago
parent 8fdc0f9c90
commit 9da4b78830
  1. 3
      jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java

@ -2650,12 +2650,13 @@ public class GLRenderer implements Renderer {
} }
} }
clearVertexAttribs();
if (indices != null) { if (indices != null) {
drawTriangleList(indices, mesh, count); drawTriangleList(indices, mesh, count);
} else { } else {
drawTriangleArray(mesh.getMode(), count, mesh.getVertexCount()); drawTriangleArray(mesh.getMode(), count, mesh.getVertexCount());
} }
clearVertexAttribs();
} }
public void renderMesh(Mesh mesh, int lod, int count, VertexBuffer[] instanceData) { public void renderMesh(Mesh mesh, int lod, int count, VertexBuffer[] instanceData) {

Loading…
Cancel
Save