From 4f2d551e90bbe8f2a7667cdbcb0cd554da2202af Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 28 Jun 2003 02:23:35 +0000 Subject: [PATCH] bring RageDisplay_OGL::CreateTexture and UpdateTexture closer together --- stepmania/src/RageDisplay_OGL.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 3bbfcd3350..a9d0c1f14e 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -992,10 +992,7 @@ void RageDisplay_OGL::UpdateTexture( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - /* XXX: We should use m_lVidPitch; we might be padded. However, I can't - * find any codec that don't force the width to a multiple of at least - * 4 anyway, so I can't test it, so I'll leave it like this for now. */ - glPixelStorei(GL_UNPACK_ROW_LENGTH, img->w); + glPixelStorei(GL_UNPACK_ROW_LENGTH, img->pitch / img->format->BytesPerPixel); // GLenum glTexFormat = GL_PIXFMT_INFO[pixfmt].internalfmt; GLenum glImageFormat = GL_PIXFMT_INFO[pixfmt].format;