MCPcopy Index your code
hub / github.com/processing/processing / readPixels

Method readPixels

core/src/processing/opengl/PGL.java:3130–3143  ·  view source on GitHub ↗
(int x, int y, int width, int height, int format, int type, Buffer buffer)

Source from the content-addressed store, hash-verified

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;

Callers 4

getColorValueMethod · 0.95
getDepthValueMethod · 0.95
getStencilValueMethod · 0.95
getMethod · 0.45

Calls 6

isMultisampledMethod · 0.95
showWarningMethod · 0.95
readPixelsImplMethod · 0.95
getHintMethod · 0.80
beginReadPixelsMethod · 0.80
endReadPixelsMethod · 0.80

Tested by

no test coverage detected