mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 17:40:48 +01:00
enable layer FBO layer when no background is called, so there should be
no need for surface hack.
This commit is contained in:
@@ -80,7 +80,7 @@ public abstract class PGL {
|
||||
* See the code and comments involving this constant in
|
||||
* PGraphicsOpenGL.endDraw().
|
||||
*/
|
||||
protected static boolean SAVE_SURFACE_TO_PIXELS_HACK = true;
|
||||
protected static boolean SAVE_SURFACE_TO_PIXELS_HACK = false;
|
||||
|
||||
/** Enables/disables mipmap use. */
|
||||
protected static boolean MIPMAPS_ENABLED = true;
|
||||
@@ -625,7 +625,7 @@ public abstract class PGL {
|
||||
|
||||
|
||||
IntBuffer labelTex;
|
||||
protected void endDraw(boolean clear0, int windowColor) {
|
||||
protected void endDraw(boolean clear, int windowColor) {
|
||||
if (fboLayerInUse) {
|
||||
syncBackTexture();
|
||||
|
||||
@@ -705,6 +705,8 @@ public abstract class PGL {
|
||||
int temp = frontTex;
|
||||
frontTex = backTex;
|
||||
backTex = temp;
|
||||
} else if (!clear && pg.parent.frameCount == 1) {
|
||||
requestFBOLayer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -754,6 +756,8 @@ public abstract class PGL {
|
||||
String ext = getString(EXTENSIONS);
|
||||
float scale = pg.getPixelScale();
|
||||
|
||||
System.err.println("creating fbo layer");
|
||||
|
||||
if (-1 < ext.indexOf("texture_non_power_of_two")) {
|
||||
fboWidth = (int)(scale * pg.width);
|
||||
fboHeight = (int)(scale * pg.height);
|
||||
|
||||
Reference in New Issue
Block a user