Access PGraphics prevent SwapBuffers

edited November 2017 in GLSL / Shaders

Just a personal experiment, no rush with reply.

I would like to access PGraphics and disable SwapBuffers in Processing. The goal is to write my own draw function, coding in JOGL i never know, what's to proper way to manage my JOGL call stack.

good chances that i can manage it on my own, the simpler version related to that question:
What is the proper way to access the default PGraphics. I know their some Java guys out here knows the answer.
Don't let me search in the forum, the answers is somewhere out their, - i know.

In case you have some JOGL knowledge:

Or is it so that the FPSAnimator is bound to the draw function?

Thanks for the reply.

*.pde to play with

// should be contentiously red
import  com.jogamp.opengl.GL4;
import com.jogamp.opengl.util.GLBuffers;
void settings() {
  size(640, 360, P3D);
  PJOGL.profile = 4;
}
void setup() { 
  GL4  gl4 = ((PJOGL)beginPGL()).gl.getGL4();
  gl4.glClearBufferfv(GL4.GL_COLOR, 0, GLBuffers.newDirectFloatBuffer(4).put(0, 1f).put(1, 0f).put(2, 0f).put(3, 1f));
  endPGL();
  frameRate(1);
}

Answers

Sign In or Register to comment.