From 88a34442a335ec13a35dfb4a69bcb35fb9440afe Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Tue, 20 Apr 2021 12:46:56 +0000 Subject: [WebGL] Bind framebuffer before DrawBuffers/ReadBuffer selection. --- dom/canvas/WebGLFramebuffer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dom') diff --git a/dom/canvas/WebGLFramebuffer.cpp b/dom/canvas/WebGLFramebuffer.cpp index 7a1d4dbd9e..cbba648bd1 100644 --- a/dom/canvas/WebGLFramebuffer.cpp +++ b/dom/canvas/WebGLFramebuffer.cpp @@ -1216,6 +1216,7 @@ WebGLFramebuffer::RefreshDrawBuffers() const } } + gl->fBindFramebuffer(LOCAL_GL_DRAW_FRAMEBUFFER, mGLName); gl->fDrawBuffers(driverBuffers.size(), driverBuffers.data()); } @@ -1235,6 +1236,7 @@ WebGLFramebuffer::RefreshReadBuffer() const driverBuffer = mColorReadBuffer->mAttachmentPoint; } + gl->fBindFramebuffer(LOCAL_GL_READ_FRAMEBUFFER, mGLName); gl->fReadBuffer(driverBuffer); } -- cgit v1.2.3