(int x, int y, int width, int height, int format, int type, Buffer buffer)
| 3185 | // to glReadPixels() should be done in readPixelsImpl(). |
| 3186 | |
| 3187 | public void readPixels(int x, int y, int width, int height, int format, int type, Buffer buffer){ |
| 3188 | boolean multisampled = isMultisampled() || graphics.offscreenMultisample; |
| 3189 | boolean depthReadingEnabled = graphics.getHint(PConstants.ENABLE_BUFFER_READING); |
| 3190 | boolean depthRequested = format == STENCIL_INDEX || format == DEPTH_COMPONENT || format == DEPTH_STENCIL; |
| 3191 | |
| 3192 | if (multisampled && depthRequested && !depthReadingEnabled) { |
| 3193 | PGraphics.showWarning(DEPTH_READING_NOT_ENABLED_ERROR); |
| 3194 | return; |
| 3195 | } |
| 3196 | |
| 3197 | graphics.beginReadPixels(); |
| 3198 | readPixelsImpl(x, y, width, height, format, type, buffer); |
| 3199 | graphics.endReadPixels(); |
| 3200 | } |
| 3201 | |
| 3202 | public void readPixels(int x, int y, int width, int height, int format, int type, long offset){ |
| 3203 | boolean multisampled = isMultisampled() || graphics.offscreenMultisample; |
no test coverage detected