Commit cd040841 authored by zmo@chromium.org's avatar zmo@chromium.org

Enable drawBuffers() also on ES3

BUG=525930
TEST=conformance2/rendering/draw_buffers.html
R=bajones@chromium.org,kbr@chromium.org

Review URL: https://codereview.chromium.org/1315193013

git-svn-id: svn://svn.chromium.org/blink/trunk@201585 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 12de0600
......@@ -605,8 +605,8 @@ void WebGLFramebuffer::drawBuffers(const Vector<GLenum>& bufs)
void WebGLFramebuffer::drawBuffersIfNecessary(bool force)
{
if (!context()->extensionEnabled(WebGLDrawBuffersName))
return;
if (context()->isWebGL2OrHigher()
|| context()->extensionEnabled(WebGLDrawBuffersName)) {
bool reset = force;
// This filtering works around graphics driver bugs on Mac OS X.
for (size_t i = 0; i < m_drawBuffers.size(); ++i) {
......@@ -626,6 +626,7 @@ void WebGLFramebuffer::drawBuffersIfNecessary(bool force)
context()->webContext()->drawBuffersEXT(
m_filteredDrawBuffers.size(), m_filteredDrawBuffers.data());
}
}
}
GLenum WebGLFramebuffer::getDrawBuffer(GLenum drawBuffer)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment