Skip to content

Commit 5f0bcdc

Browse files
committed
no need to initialize line and point buffers in 2D
1 parent 1bd651b commit 5f0bcdc

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

core/src/processing/opengl/PShapeOpenGL.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4605,12 +4605,14 @@ protected void initBuffers() {
46054605
initPolyBuffers();
46064606
}
46074607

4608-
if (hasLines && (needBufferInit || outdated)) {
4609-
initLineBuffers();
4610-
}
4608+
if (is3D()) {
4609+
if (hasLines && (needBufferInit || outdated)) {
4610+
initLineBuffers();
4611+
}
46114612

4612-
if (hasPoints && (needBufferInit || outdated)) {
4613-
initPointBuffers();
4613+
if (hasPoints && (needBufferInit || outdated)) {
4614+
initPointBuffers();
4615+
}
46144616
}
46154617

46164618
needBufferInit = false;

0 commit comments

Comments
 (0)