зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1257593 - Handle webgl FramebufferTexture2D() with an unbound texture. r=jgilbert
This commit is contained in:
Родитель
8de9fb7cf2
Коммит
dc73cc267c
|
@ -624,6 +624,12 @@ WebGLFramebuffer::FramebufferTexture2D(GLenum attachment, TexImageTarget texImag
|
|||
return;
|
||||
|
||||
if (tex) {
|
||||
if (!tex->HasEveryBeenBound()) {
|
||||
mContext->ErrorInvalidOperation("framebufferTexture2D: the texture"
|
||||
" is not the name of a texture.");
|
||||
return;
|
||||
}
|
||||
|
||||
bool isTexture2D = tex->Target() == LOCAL_GL_TEXTURE_2D;
|
||||
bool isTexTarget2D = texImageTarget == LOCAL_GL_TEXTURE_2D;
|
||||
if (isTexture2D != isTexTarget2D) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче