Bug 1243908 - Use DrawBuffers through GLScreenBuffer when operating on fb0. - r=jrmuizel

This commit is contained in:
Jeff Gilbert 2016-01-26 12:42:39 -08:00
parent 50acbbf513
commit 95b0b423a5

View File

@ -1304,8 +1304,7 @@ WebGLContext::ClearScreen()
const bool changeDrawBuffers = (mDefaultFB_DrawBuffer0 != LOCAL_GL_BACK); const bool changeDrawBuffers = (mDefaultFB_DrawBuffer0 != LOCAL_GL_BACK);
if (changeDrawBuffers) { if (changeDrawBuffers) {
const GLenum back = LOCAL_GL_BACK; gl->Screen()->SetDrawBuffer(LOCAL_GL_BACK);
gl->fDrawBuffers(1, &back);
} }
GLbitfield bufferBits = LOCAL_GL_COLOR_BUFFER_BIT; GLbitfield bufferBits = LOCAL_GL_COLOR_BUFFER_BIT;
@ -1317,7 +1316,7 @@ WebGLContext::ClearScreen()
ForceClearFramebufferWithDefaultValues(bufferBits, mNeedsFakeNoAlpha); ForceClearFramebufferWithDefaultValues(bufferBits, mNeedsFakeNoAlpha);
if (changeDrawBuffers) { if (changeDrawBuffers) {
gl->fDrawBuffers(1, &mDefaultFB_DrawBuffer0); gl->Screen()->SetDrawBuffer(mDefaultFB_DrawBuffer0);
} }
} }