mirror of
https://github.com/processing/processing4.git
synced 2026-05-20 15:13:48 +02:00
correct size value for line/point indices
This commit is contained in:
@@ -1255,9 +1255,9 @@ public class PGraphicsLWJGL extends PGraphics {
|
||||
|
||||
tessGeo.prepareLineIndicesForCopy();
|
||||
|
||||
int sizex = size * PGL.SIZEOF_INDEX;
|
||||
pgl.glBindBuffer(PGL.GL_ELEMENT_ARRAY_BUFFER, glLineIndexBufferID);
|
||||
pgl.glBufferData(PGL.GL_ELEMENT_ARRAY_BUFFER, sizex, tessGeo.lineIndices, vboMode);
|
||||
pgl.glBufferData(PGL.GL_ELEMENT_ARRAY_BUFFER, tessGeo.lineIndexCount * PGL.SIZEOF_INDEX,
|
||||
tessGeo.lineIndices, vboMode);
|
||||
}
|
||||
|
||||
protected void unbindLineBuffers() {
|
||||
@@ -1323,9 +1323,9 @@ public class PGraphicsLWJGL extends PGraphics {
|
||||
|
||||
tessGeo.preparePointIndicesForCopy();
|
||||
|
||||
int sizex = size * PGL.SIZEOF_INDEX;
|
||||
pgl.glBindBuffer(PGL.GL_ELEMENT_ARRAY_BUFFER, glPointIndexBufferID);
|
||||
pgl.glBufferData(PGL.GL_ELEMENT_ARRAY_BUFFER, sizex, tessGeo.pointIndices, vboMode);
|
||||
pgl.glBufferData(PGL.GL_ELEMENT_ARRAY_BUFFER, tessGeo.pointIndexCount * PGL.SIZEOF_INDEX,
|
||||
tessGeo.pointIndices, vboMode);
|
||||
}
|
||||
|
||||
protected void unbindPointBuffers() {
|
||||
|
||||
@@ -1255,9 +1255,9 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
|
||||
tessGeo.prepareLineIndicesForCopy();
|
||||
|
||||
int sizex = size * PGL.SIZEOF_INDEX;
|
||||
pgl.glBindBuffer(PGL.GL_ELEMENT_ARRAY_BUFFER, glLineIndexBufferID);
|
||||
pgl.glBufferData(PGL.GL_ELEMENT_ARRAY_BUFFER, sizex, tessGeo.lineIndices, vboMode);
|
||||
pgl.glBufferData(PGL.GL_ELEMENT_ARRAY_BUFFER, tessGeo.lineIndexCount * PGL.SIZEOF_INDEX,
|
||||
tessGeo.lineIndices, vboMode);
|
||||
}
|
||||
|
||||
protected void unbindLineBuffers() {
|
||||
@@ -1323,9 +1323,9 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
|
||||
tessGeo.preparePointIndicesForCopy();
|
||||
|
||||
int sizex = size * PGL.SIZEOF_INDEX;
|
||||
pgl.glBindBuffer(PGL.GL_ELEMENT_ARRAY_BUFFER, glPointIndexBufferID);
|
||||
pgl.glBufferData(PGL.GL_ELEMENT_ARRAY_BUFFER, sizex, tessGeo.pointIndices, vboMode);
|
||||
pgl.glBufferData(PGL.GL_ELEMENT_ARRAY_BUFFER, tessGeo.pointIndexCount * PGL.SIZEOF_INDEX,
|
||||
tessGeo.pointIndices, vboMode);
|
||||
}
|
||||
|
||||
protected void unbindPointBuffers() {
|
||||
@@ -2281,8 +2281,9 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
protected void renderLines() {
|
||||
if (!lineVBOsCreated) {
|
||||
createLineBuffers();
|
||||
lineVBOsCreated = true;
|
||||
lineVBOsCreated = true;
|
||||
}
|
||||
|
||||
updateLineBuffers();
|
||||
|
||||
LineShader shader = getLineShader();
|
||||
@@ -2294,7 +2295,8 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
pgl.glDrawElements(PGL.GL_TRIANGLES, tessGeo.lineIndexCount, PGL.INDEX_TYPE, 0);
|
||||
|
||||
shader.stop();
|
||||
unbindLineBuffers();
|
||||
|
||||
unbindLineBuffers();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user