From b24aab30527feb67f32e0f7a43dc8be4eb0fc0da Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Sat, 8 Jan 2011 16:05:27 +0000 Subject: OPENGL: Skip empty texture updates. This fixes some hangs when calling the GMM while running Fascination. svn-id: r55166 --- backends/graphics/opengl/gltexture.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backends') diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp index 843ec2d2b3..cd9e23cb71 100644 --- a/backends/graphics/opengl/gltexture.cpp +++ b/backends/graphics/opengl/gltexture.cpp @@ -141,6 +141,10 @@ void GLTexture::allocBuffer(GLuint w, GLuint h) { } void GLTexture::updateBuffer(const void *buf, int pitch, GLuint x, GLuint y, GLuint w, GLuint h) { + // Skip empty updates. + if (w * h == 0) + return; + // Select this OpenGL texture glBindTexture(GL_TEXTURE_2D, _textureName); CHECK_GL_ERROR(); -- cgit v1.2.3