Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(868)

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 1173203013: WebGL 2: a small fix to support mipmap level in framebufferTexture2D (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index 0de60d442fa09bf2852f82e317b2e02e28247600..4c7cc57438bcead5516d20fa34c7911ad4e7c9e6 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -2039,7 +2039,10 @@ void WebGLRenderingContextBase::framebufferTexture2D(GLenum target, GLenum attac
{
if (isContextLost() || !validateFramebufferFuncParameters("framebufferTexture2D", target, attachment))
return;
- if (level) {
+ if (isWebGL2OrHigher()) {
+ if (!validateTexFuncLevel("framebufferTexture2D", textarget, level))
+ return;
+ } else if (level) {
synthesizeGLError(GL_INVALID_VALUE, "framebufferTexture2D", "level not 0");
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698