Fix buffer initialized with wrong number of components

Poly vertex buffer was initialized with 3 components, but has 4.
This commit is contained in:
Jakub Valtar
2018-11-07 22:30:11 +01:00
parent db5cff7128
commit 809115c131
@@ -1190,7 +1190,7 @@ public class PGraphicsOpenGL extends PGraphics {
if (!polyBuffersCreated || polyBuffersContextIsOutdated()) {
polyBuffersContext = pgl.getCurrentContext();
bufPolyVertex = new VertexBuffer(this, PGL.ARRAY_BUFFER, 3, PGL.SIZEOF_FLOAT);
bufPolyVertex = new VertexBuffer(this, PGL.ARRAY_BUFFER, 4, PGL.SIZEOF_FLOAT);
bufPolyColor = new VertexBuffer(this, PGL.ARRAY_BUFFER, 1, PGL.SIZEOF_INT);
bufPolyNormal = new VertexBuffer(this, PGL.ARRAY_BUFFER, 3, PGL.SIZEOF_FLOAT);
bufPolyTexcoord = new VertexBuffer(this, PGL.ARRAY_BUFFER, 2, PGL.SIZEOF_FLOAT);