(int x, int y, int width, int height, int format, int type, Buffer buffer)
| 3128 | // to glReadPixels() should be done in readPixelsImpl(). |
| 3129 | |
| 3130 | public void readPixels(int x, int y, int width, int height, int format, int type, Buffer buffer){ |
| 3131 | boolean multisampled = isMultisampled() || graphics.offscreenMultisample; |
| 3132 | boolean depthReadingEnabled = graphics.getHint(PConstants.ENABLE_BUFFER_READING); |
| 3133 | boolean depthRequested = format == STENCIL_INDEX || format == DEPTH_COMPONENT || format == DEPTH_STENCIL; |
| 3134 | |
| 3135 | if (multisampled && depthRequested && !depthReadingEnabled) { |
| 3136 | PGraphics.showWarning(DEPTH_READING_NOT_ENABLED_ERROR); |
| 3137 | return; |
| 3138 | } |
| 3139 | |
| 3140 | graphics.beginReadPixels(); |
| 3141 | readPixelsImpl(x, y, width, height, format, type, buffer); |
| 3142 | graphics.endReadPixels(); |
| 3143 | } |
| 3144 | |
| 3145 | public void readPixels(int x, int y, int width, int height, int format, int type, long offset){ |
| 3146 | boolean multisampled = isMultisampled() || graphics.offscreenMultisample; |
no test coverage detected