mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 11:21:06 +01:00
now grouping glClear calls
This commit is contained in:
@@ -167,11 +167,9 @@ public class FrameBuffer implements PConstants {
|
||||
pg.pushFramebuffer();
|
||||
pg.setFramebuffer(this);
|
||||
pgl.glClearDepth(1);
|
||||
pgl.glClear(PGL.GL_DEPTH_BUFFER_BIT);
|
||||
pgl.glClearStencil(0);
|
||||
pgl.glClear(PGL.GL_STENCIL_BUFFER_BIT);
|
||||
pgl.glClearColor(0, 0, 0, 0);
|
||||
pgl.glClear(PGL.GL_COLOR_BUFFER_BIT);
|
||||
pgl.glClear(PGL.GL_DEPTH_BUFFER_BIT | PGL.GL_STENCIL_BUFFER_BIT | PGL.GL_COLOR_BUFFER_BIT);
|
||||
pg.popFramebuffer();
|
||||
}
|
||||
|
||||
|
||||
@@ -709,12 +709,9 @@ public class PGL {
|
||||
gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0);
|
||||
|
||||
// And finally write the color texture to the screen.
|
||||
glClearDepth(1);
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
glClearStencil(0);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glClearColor(0, 0, 0, 0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
gl.glClearDepth(1);
|
||||
gl.glClearColor(0, 0, 0, 0);
|
||||
gl.glClear(GL.GL_DEPTH_BUFFER_BIT | GL.GL_STENCIL_BUFFER_BIT);
|
||||
drawTexture(GL.GL_TEXTURE_2D, colorTex[0], fboWidth, fboHeight, 0, 0, pg.width, pg.height, 0, 0, pg.width, pg.height);
|
||||
|
||||
PGraphicsOpenGL.screenFramebuffer.glFboID = colorFBO[0];
|
||||
@@ -1290,8 +1287,8 @@ public class PGL {
|
||||
public void glClearStencil(int s) {
|
||||
gl.glClearStencil(s);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void glClearColor(float r, float g, float b, float a) {
|
||||
gl.glClearColor(r, g, b, a);
|
||||
}
|
||||
|
||||
@@ -1564,9 +1564,8 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
// Clear depth and stencil buffers.
|
||||
pgl.glDepthMask(true);
|
||||
pgl.glClearDepth(1);
|
||||
pgl.glClear(PGL.GL_DEPTH_BUFFER_BIT);
|
||||
pgl.glClearStencil(0);
|
||||
pgl.glClear(PGL.GL_STENCIL_BUFFER_BIT);
|
||||
pgl.glClear(PGL.GL_DEPTH_BUFFER_BIT | PGL.GL_STENCIL_BUFFER_BIT);
|
||||
|
||||
if (primarySurface) {
|
||||
pgl.beginOnscreenDraw(clearColorBuffer);
|
||||
@@ -4692,9 +4691,6 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
} else {
|
||||
pgl.glDepthMask(true);
|
||||
}
|
||||
|
||||
pgl.glClearStencil(0);
|
||||
pgl.glClear(PGL.GL_STENCIL_BUFFER_BIT);
|
||||
|
||||
pgl.glClearColor(backgroundR, backgroundG, backgroundB, backgroundA);
|
||||
pgl.glClear(PGL.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
Reference in New Issue
Block a user