Hi everyone - I am having a strange bug, and I hope I’m just overlooking something really simple. I’m using the P3D renderer to do opengl-like calls, and I’m not a fan of the antialiasing. However, if I use noSmooth, points fail to draw. Lines still draw.
Hi, @jimyoung
True. When testing I discovered that this also is the case using point().
It seems that when using P3D mode you have to give a minimal strokeWeight(1.5);
and a quick followup. Man POINTS is slow in processing. I’m testing a line algorithm, and the exact same code is about 30x faster on JOGL than on P3D (!!).
I was using JOGL in straight Java (without linking to Processing).
I’ve since found how I can access OpenGL 2 context in Processing 3, and that approach brings the processing speed up to what I’d expect. I didn’t realize that Processing only simulates OpenGL 2 in the current version.
Sorry Neil - rushing between tasks and my comments are a little underspecified.
I’ve struggled to find clear documentation on using OpenGL in Processing, so your link is certainly helpful. There seems to be several ways about it, and the documentation online is mixed to say the least.
My requirements are that I need to use immediate mode OpenGL, which was the standard in OpenGL2. You know, the glBegin, glEnd, etc etc.
I read somewhere (I can’t find the link currently) that in Processing 3., the OpenGL hooks for immediate mode were removed, and processing just emulates that functionality when we use the beginShape/endShape, vertex, etc., calls. This certainly would explain my performance issue.
I found that I can set the OpenGl profile to a lower value which enables me to get the GL2 context
(PJOGL.profile = 1; … PJOGL pgl = (PJOGL) beginPGL(); gl2 = pgl.gl.getGL2() and then I can use that with my immediate mode functions.