mirror of
https://github.com/samsonjs/media.git
synced 2026-04-08 11:45:51 +00:00
Add glClear call before drawing.
PiperOrigin-RevId: 428492031
This commit is contained in:
parent
3a7f73f1e2
commit
11f1ebb347
1 changed files with 2 additions and 0 deletions
|
|
@ -352,6 +352,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
/** Focuses the specified surface with the specified width and height, then draws a quad. */
|
||||
private void focusAndDrawQuad(EGLSurface eglSurface, int width, int height) {
|
||||
GlUtil.focusEglSurface(eglDisplay, eglContext, eglSurface, width, height);
|
||||
GLES20.glClearColor(/* red= */ 0, /* green= */ 0, /* blue= */ 0, /* alpha= */ 0);
|
||||
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
|
||||
// The four-vertex triangle strip forms a quad.
|
||||
GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, /* first= */ 0, /* count= */ 4);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue