From 6d629d4d7929ab069a407f039ad38980c6f4c8ce Mon Sep 17 00:00:00 2001 From: codeanticode Date: Sun, 27 Nov 2011 22:58:03 +0000 Subject: [PATCH] fixed renderPoints --- .../opengl/src/processing/opengl/PGraphicsOpenGL.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java b/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java index 5bd82fe9d..84a73f665 100644 --- a/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java +++ b/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java @@ -2770,7 +2770,7 @@ public class PGraphicsOpenGL extends PGraphics { lineShader.setVecUniform("viewport", viewport[0], viewport[1], viewport[2], viewport[3]); int attribsID = lineShader.getAttribLocation("attribs"); - ogl.gl2x.glEnableVertexAttribArray(attribsID); + gl2x.glEnableVertexAttribArray(attribsID); gl2x.glVertexAttribPointer(attribsID, 4, GL.GL_FLOAT, false, 0, FloatBuffer.wrap(tess.lineAttributes)); gl2f.glDrawElements(GL.GL_TRIANGLES, tess.lineIndexCount, GL.GL_UNSIGNED_INT, IntBuffer.wrap(tess.lineIndices)); @@ -2800,7 +2800,11 @@ public class PGraphicsOpenGL extends PGraphics { normalBuffer.rewind(); normalBuffer.put(tess.pointNormals, 0, 3 * tess.pointVertexCount); normalBuffer.position(0); - + + gl2f.glEnableClientState(GL2.GL_VERTEX_ARRAY); + gl2f.glEnableClientState(GL2.GL_COLOR_ARRAY); + gl2f.glEnableClientState(GL2.GL_NORMAL_ARRAY); + int attribsID = pointShader.getAttribLocation("vertDisp"); gl2x.glEnableVertexAttribArray(attribsID); gl2x.glVertexAttribPointer(attribsID, 2, GL.GL_FLOAT, false, 0, FloatBuffer.wrap(tess.pointAttributes));