From 0975b3c753b876629820ff890a0fd8aaa10a8869 Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Mon, 3 Aug 2015 19:17:13 -0400 Subject: [PATCH] PGL: fix depth reading for off-screen buffers --- core/src/processing/opengl/PGL.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index 214b0ba13..8ff575adf 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -2716,7 +2716,7 @@ public abstract class PGL { // to glReadPixels() should be done in readPixelsImpl(). public void readPixels(int x, int y, int width, int height, int format, int type, Buffer buffer){ - boolean multisampled = isMultisampled(); + boolean multisampled = isMultisampled() || pg.offscreenMultisample; boolean depthReadingEnabled = pg.getHint(PConstants.ENABLE_DEPTH_READING); boolean depthRequested = format == STENCIL_INDEX || format == DEPTH_COMPONENT || format == DEPTH_STENCIL;