Bug 680724: moved height and width checks for render buffers r=bjacob

This commit is contained in:
Doug Sherk 2011-08-25 14:28:59 -04:00
parent e3fe16b123
commit 00b59bb7f3

View File

@ -3167,8 +3167,8 @@ WebGLContext::RenderbufferStorage(WebGLenum target, WebGLenum internalformat, We
if (target != LOCAL_GL_RENDERBUFFER)
return ErrorInvalidEnumInfo("renderbufferStorage: target", target);
if (width <= 0 || height <= 0)
return ErrorInvalidValue("renderbufferStorage: width and height must be > 0");
if (width < 0 || height < 0)
return ErrorInvalidValue("renderbufferStorage: width and height must be >= 0");
if (!mBoundRenderbuffer || !mBoundRenderbuffer->GLName())
return ErrorInvalidOperation("renderbufferStorage called on renderbuffer 0");