[WebGL2] Multiple Render Targets.
authorroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Mar 2015 19:30:20 +0000 (19:30 +0000)
committerroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Mar 2015 19:30:20 +0000 (19:30 +0000)
commite74920563b2755e6c4b89dc168594593324a4383
tree848d76b79dda1d749b2e362c3cec283dee8162ec
parent2786becee93f629bbb48a37a6677734dd3718355
[WebGL2] Multiple Render Targets.
https://bugs.webkit.org/show_bug.cgi?id=126994.
<rdar://problem/15815766>
Reviewed by Dean Jackson.
Tested by a modified version of the 1.0.3 conformance test:
conformance/extensions/webgl-draw-buffers.html
This test will be landed along with other modified extension conformance tests
once approval from Khronos is received.
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::drawBuffers): Mostly the same as WebGLDrawBuffers::drawBuffersWEBGL.
Returns different error messages, uses non EXT enums.
(WebCore::WebGL2RenderingContext::clearBufferiv): This actually does nothing for now but the validation has been implemented.
(WebCore::WebGL2RenderingContext::clearBufferuiv): Ditto.
(WebCore::WebGL2RenderingContext::clearBufferfv): Ditto.
(WebCore::WebGL2RenderingContext::clearBufferfi): Ditto.
(WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Removes the extension object check.
(WebCore::WebGL2RenderingContext::getMaxDrawBuffers):
(WebCore::WebGL2RenderingContext::getMaxColorAttachments): Must return the same thing as getMaxDrawBuffers.
(WebCore::WebGL2RenderingContext::getParameter): Remove extension object checks.
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Copied from WebGLRenderingContextBase.
(WebCore::WebGLRenderingContext::getMaxDrawBuffers): Ditto.
(WebCore::WebGLRenderingContext::getMaxColorAttachments): Ditto.
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::validateFramebufferFuncParameters): Deleted.
* html/canvas/WebGLRenderingContextBase.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGL2RenderingContext.h
Source/WebCore/html/canvas/WebGLFramebuffer.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.h
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.h