Warn on glClear(0) |
||
Issue descriptionWe should warn if the user calls glClear and doesn't specify one of the valid clear bits. This is a really easy mistake to make in WebGL because any typo in the enum passed to clear will make it an undefined value which is coerced to 0 without any warning. We could also think about warning if there are invalid bits set, which would catch classic cases like glClear(GL_DEPTH) (instead of the intended glClear(GL_DEPTH_BUFFER_BIT)).
,
Dec 19
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4fedf19dd8567a99769a3da28f923351a8d7ffda commit 4fedf19dd8567a99769a3da28f923351a8d7ffda Author: Kenneth Russell <kbr@chromium.org> Date: Wed Dec 19 07:17:08 2018 Warn on WebGLRenderingContext.clear() if no buffers set to clear. Bug: 916273 Change-Id: I71c9983c9464827a2c9254bc6c88de152bbbb253 Reviewed-on: https://chromium-review.googlesource.com/c/1383355 Reviewed-by: James Darpinian <jdarpinian@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org> Cr-Commit-Position: refs/heads/master@{#617753} [modify] https://crrev.com/4fedf19dd8567a99769a3da28f923351a8d7ffda/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
,
Dec 19
|
||
►
Sign in to add a comment |
||
Comment 1 by jdarpinian@chromium.org
, Dec 18