From ef3e75dbe99c097995d79be437d181884be49d12 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 21 Jul 2012 03:50:38 +0000 Subject: [PATCH] Pass the row length rather than frame width to OpenGL for the unpack row length Originally committed to SVN as r6937. --- aegisub/src/video_out_gl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/src/video_out_gl.cpp b/aegisub/src/video_out_gl.cpp index 0cb8cad21..75fc87b59 100644 --- a/aegisub/src/video_out_gl.cpp +++ b/aegisub/src/video_out_gl.cpp @@ -290,7 +290,7 @@ void VideoOutGL::UploadFrameData(const AegiVideoFrame& frame) { InitTextures(frame.w, frame.h, format, frame.GetBpp(), frame.flipped); // Set the row length, needed to be able to upload partial rows - CHECK_ERROR(glPixelStorei(GL_UNPACK_ROW_LENGTH, frame.w)); + CHECK_ERROR(glPixelStorei(GL_UNPACK_ROW_LENGTH, frame.pitch / frame.GetBpp())); for (unsigned i = 0; i < textureList.size(); i++) { TextureInfo& ti = textureList[i];