mirror of
https://github.com/processing/processing4.git
synced 2026-02-21 06:15:50 +01:00
removed PGL.update(), and updatePrimary, updateOffscreen() in
PGraphicsOpenGL.
This commit is contained in:
@@ -295,6 +295,7 @@ public class PGL {
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
// FBO layer
|
||||
|
||||
protected static boolean fboLayerRequested = false;
|
||||
protected static boolean fboLayerCreated = false;
|
||||
protected static boolean fboLayerInUse = false;
|
||||
@@ -588,19 +589,6 @@ public class PGL {
|
||||
}
|
||||
|
||||
|
||||
protected void update() {
|
||||
if (!setFps) setFps(targetFps);
|
||||
|
||||
if (fboLayerRequested && !fboLayerCreated && !USE_JOGL_FBOLAYER) {
|
||||
createFBOLayer();
|
||||
}
|
||||
// if (USE_JOGL_FBOLAYER) return;
|
||||
// if (!fboLayerCreated) {
|
||||
// createFBOLayer();
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
protected int getReadFramebuffer() {
|
||||
if (fboLayerInUse) {
|
||||
return glColorFbo.get(0);
|
||||
@@ -993,9 +981,13 @@ public class PGL {
|
||||
|
||||
|
||||
protected void beginDraw(boolean clear0) {
|
||||
if (!setFps) setFps(targetFps);
|
||||
|
||||
if (USE_JOGL_FBOLAYER) return;
|
||||
|
||||
if (needFBOLayer(clear0)) {
|
||||
if (!fboLayerCreated) createFBOLayer();
|
||||
|
||||
bindFramebuffer(FRAMEBUFFER, glColorFbo.get(0));
|
||||
framebufferTexture2D(FRAMEBUFFER, COLOR_ATTACHMENT0,
|
||||
TEXTURE_2D, glColorTex.get(backTex), 0);
|
||||
|
||||
@@ -5852,13 +5852,7 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
}
|
||||
|
||||
|
||||
protected void updatePrimary() {
|
||||
pgl.update();
|
||||
}
|
||||
|
||||
|
||||
protected void beginOnscreenDraw() {
|
||||
updatePrimary();
|
||||
pgl.beginDraw(clearColorBuffer);
|
||||
|
||||
if (drawFramebuffer == null) {
|
||||
@@ -5939,7 +5933,7 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
}
|
||||
|
||||
|
||||
protected void updateOffscreen() {
|
||||
protected void beginOffscreenDraw() {
|
||||
if (!initialized) {
|
||||
initOffscreen();
|
||||
} else {
|
||||
@@ -5964,11 +5958,7 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
} else {
|
||||
setFramebuffer(offscreenFramebuffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void beginOffscreenDraw() {
|
||||
updateOffscreen();
|
||||
// Render previous back texture (now is the front) as background
|
||||
drawPTexture();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user