mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 10:30:44 +01:00
continues the removal of static references
This commit is contained in:
@@ -40,6 +40,7 @@ import java.nio.IntBuffer;
|
||||
*/
|
||||
|
||||
public class FrameBuffer implements PConstants {
|
||||
protected PGraphicsOpenGL pg;
|
||||
protected PGL pgl;
|
||||
protected int context; // The context that created this framebuffer.
|
||||
|
||||
@@ -67,16 +68,17 @@ public class FrameBuffer implements PConstants {
|
||||
protected IntBuffer pixelBuffer;
|
||||
|
||||
|
||||
FrameBuffer() {
|
||||
pgl = PGraphicsOpenGL.pgPrimary.pgl;
|
||||
FrameBuffer(PGraphicsOpenGL pg) {
|
||||
this.pg = pg;
|
||||
pgl = pg.pgl;
|
||||
context = pgl.createEmptyContext();
|
||||
}
|
||||
|
||||
|
||||
FrameBuffer(int w, int h, int samples, int colorBuffers,
|
||||
FrameBuffer(PGraphicsOpenGL pg, int w, int h, int samples, int colorBuffers,
|
||||
int depthBits, int stencilBits, boolean packedDepthStencil,
|
||||
boolean screen) {
|
||||
this();
|
||||
this(pg);
|
||||
|
||||
glFbo = 0;
|
||||
glDepth = 0;
|
||||
@@ -136,13 +138,13 @@ public class FrameBuffer implements PConstants {
|
||||
}
|
||||
|
||||
|
||||
FrameBuffer(int w, int h) {
|
||||
this(w, h, 1, 1, 0, 0, false, false);
|
||||
FrameBuffer(PGraphicsOpenGL pg, int w, int h) {
|
||||
this(pg, w, h, 1, 1, 0, 0, false, false);
|
||||
}
|
||||
|
||||
|
||||
FrameBuffer(PGraphicsOpenGL pg, int w, int h, boolean screen) {
|
||||
this(w, h, 1, 1, 0, 0, false, screen);
|
||||
this(pg, w, h, 1, 1, 0, 0, false, screen);
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +203,7 @@ public class FrameBuffer implements PConstants {
|
||||
noDepth = true;
|
||||
}
|
||||
|
||||
public void finish(PGraphicsOpenGL pg) {
|
||||
public void finish() {
|
||||
if (noDepth) {
|
||||
// No need to clear depth buffer because depth testing was disabled.
|
||||
if (pg.getHint(ENABLE_DEPTH_TEST)) {
|
||||
|
||||
Reference in New Issue
Block a user