Pass the row length rather than frame width to OpenGL for the unpack row length

Originally committed to SVN as r6937.
This commit is contained in:
Thomas Goyne 2012-07-21 03:50:38 +00:00
parent 556f0514c2
commit ef3e75dbe9

View file

@ -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];