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

Method clearBackground

core/src/processing/opengl/PGL.java:663–692  ·  view source on GitHub ↗
(float r, float g, float b, float a,
                                 boolean depth, boolean stencil)

Source from the content-addressed store, hash-verified

661
662
663 protected void clearBackground(float r, float g, float b, float a,
664 boolean depth, boolean stencil) {
665 clearColor(r, g, b, a);
666 if (depth && stencil) {
667 clearDepth(1);
668 clearStencil(0);
669 clear(DEPTH_BUFFER_BIT | STENCIL_BUFFER_BIT | COLOR_BUFFER_BIT);
670 if (0 < sketch.frameCount) {
671 clearDepth = true;
672 clearStencil = true;
673 }
674 } else if (depth) {
675 clearDepth(1);
676 clear(DEPTH_BUFFER_BIT | COLOR_BUFFER_BIT);
677 if (0 < sketch.frameCount) {
678 clearDepth = true;
679 }
680 } else if (stencil) {
681 clearStencil(0);
682 clear(STENCIL_BUFFER_BIT | COLOR_BUFFER_BIT);
683 if (0 < sketch.frameCount) {
684 clearStencil = true;
685 }
686 } else {
687 clear(PGL.COLOR_BUFFER_BIT);
688 }
689 if (0 < sketch.frameCount) {
690 clearColor = true;
691 }
692 }
693
694
695 protected void beginRender() {

Callers 1

backgroundImplMethod · 0.80

Calls 4

clearColorMethod · 0.95
clearDepthMethod · 0.95
clearStencilMethod · 0.95
clearMethod · 0.95

Tested by

no test coverage detected