diff options
-rw-r--r-- | opengl/libagl/texture.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp index 90e6d2946a..13d078e2a3 100644 --- a/opengl/libagl/texture.cpp +++ b/opengl/libagl/texture.cpp @@ -1252,6 +1252,11 @@ void glTexSubImage2D( ogles_error(c, GL_INVALID_OPERATION); return; } + + if (format != tex->internalformat) { + ogles_error(c, GL_INVALID_OPERATION); + return; + } if ((xoffset + width > GLsizei(surface.width)) || (yoffset + height > GLsizei(surface.height))) { ogles_error(c, GL_INVALID_VALUE); |