зеркало из https://github.com/mozilla/gecko-dev.git
Bug 743813 - Fix the warnings generated by WebGL activeTexture - r=jgilbert
This commit is contained in:
Родитель
d9adfa7a3f
Коммит
401a30de2c
|
@ -134,9 +134,15 @@ WebGLContext::ActiveTexture(WebGLenum texture)
|
||||||
if (!IsContextStable())
|
if (!IsContextStable())
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
if (texture < LOCAL_GL_TEXTURE0 || texture >= LOCAL_GL_TEXTURE0 + mBound2DTextures.Length())
|
if (texture < LOCAL_GL_TEXTURE0 ||
|
||||||
return ErrorInvalidEnum("ActiveTexture: texture unit %d out of range (0..%d)",
|
texture >= LOCAL_GL_TEXTURE0 + mGLMaxTextureUnits)
|
||||||
texture, mBound2DTextures.Length()-1);
|
{
|
||||||
|
return ErrorInvalidEnum(
|
||||||
|
"ActiveTexture: texture unit %d out of range. "
|
||||||
|
"Accepted values range from TEXTURE0 to TEXTURE0 + %d. "
|
||||||
|
"Notice that TEXTURE0 != 0.",
|
||||||
|
texture, mGLMaxTextureUnits);
|
||||||
|
}
|
||||||
|
|
||||||
MakeContextCurrent();
|
MakeContextCurrent();
|
||||||
mActiveTexture = texture - LOCAL_GL_TEXTURE0;
|
mActiveTexture = texture - LOCAL_GL_TEXTURE0;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче