mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
use glUsage variable
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user