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.
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.
Not sure what you mean there?! The renderer has overhead in certain scenarios - it’s not simulating anything - but it’s not the same as working directly with raw GL either. I’m not sure why you’re mentioning OpenGL 2 rather than OpenGL 3, but it’s definitely possible to make performant point clouds using beginPGL() for low level OpenGL without directly accessing JOGL classes. Check out eg. https://github.com/KessonDalef/processing_opengl_demonstration_pogl
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.