[Scummvm-cvs-logs] SF.net SVN: scummvm:[51491] scummvm/branches/gsoc2010-opengl/backends/ graphics/opengl/gltexture.cpp

vgvgf at users.sourceforge.net vgvgf at users.sourceforge.net
Fri Jul 30 04:58:35 CEST 2010


Revision: 51491
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51491&view=rev
Author:   vgvgf
Date:     2010-07-30 02:58:35 +0000 (Fri, 30 Jul 2010)

Log Message:
-----------
OPENGL: Fix crash on Broken Sword 2 when refreshing screen.

I must admit that I do not know why it does crash, but it seems that updating row by row is safer and does not makes problems.

Modified Paths:
--------------
    scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/gltexture.cpp

Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/gltexture.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/gltexture.cpp	2010-07-30 01:00:32 UTC (rev 51490)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/gltexture.cpp	2010-07-30 02:58:35 UTC (rev 51491)
@@ -142,10 +142,10 @@
 	glBindTexture(GL_TEXTURE_2D, _textureName); CHECK_GL_ERROR();
 
 	// Check if the buffer has its data contiguously
-	if (static_cast<int>(w) * _bytesPerPixel == pitch) {
+	/*if (static_cast<int>(w) * _bytesPerPixel == pitch) {
 		glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h,
 						_glFormat, _glType, buf); CHECK_GL_ERROR();
-	} else {
+	} else {*/
 		// Update the texture row by row
 		const byte *src = static_cast<const byte *>(buf);
 		do {
@@ -154,7 +154,7 @@
 			++y;
 			src += pitch;
 		} while (--h);
-	}
+	//}
 }
 
 void GLTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list