From 03953fd26a2c17e1518e292374f201de054d652e Mon Sep 17 00:00:00 2001 From: codeanticode Date: Sun, 15 Nov 2015 16:21:30 -0500 Subject: [PATCH] use glUsage variable --- core/src/processing/opengl/PGraphicsOpenGL.java | 4 ++-- core/src/processing/opengl/PShapeOpenGL.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index b824d7ee8..5ed10e7c4 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -9764,7 +9764,7 @@ public class PGraphicsOpenGL extends PGraphics { trimPolySpecular(); trimPolyEmissive(); trimPolyShininess(); - trimAttributes(); + trimPolyAttributes(); } if (0 < polyIndexCount && polyIndexCount < polyIndices.length) { @@ -9848,7 +9848,7 @@ public class PGraphicsOpenGL extends PGraphics { polyShininessBuffer = PGL.allocateFloatBuffer(polyShininess); } - void trimAttributes() { + void trimPolyAttributes() { for (String name: polyAttribs.keySet()) { VertexAttribute attrib = polyAttribs.get(name); if (attrib.type == PGL.FLOAT) { diff --git a/core/src/processing/opengl/PShapeOpenGL.java b/core/src/processing/opengl/PShapeOpenGL.java index e8051d7fa..149aea8cb 100644 --- a/core/src/processing/opengl/PShapeOpenGL.java +++ b/core/src/processing/opengl/PShapeOpenGL.java @@ -3879,7 +3879,7 @@ public class PShapeOpenGL extends PShape { if (!attrib.bufferCreated()) attrib.createBuffer(pgl); pgl.bindBuffer(PGL.ARRAY_BUFFER, attrib.buf.glId); pgl.bufferData(PGL.ARRAY_BUFFER, attrib.sizeInBytes(size), - tessGeo.polyAttribBuffers.get(name), PGL.STATIC_DRAW); + tessGeo.polyAttribBuffers.get(name), glUsage); } pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);