Fix crashes in RageDisplay_OGL::UpdateTexture when the surface and texture

formats differ.
This commit is contained in:
Glenn Maynard
2003-08-29 04:46:54 +00:00
parent 7d208b71c0
commit 13cccb9991
+2 -2
View File
@@ -1184,11 +1184,11 @@ void RageDisplay_OGL::UpdateTexture(
{
glBindTexture( GL_TEXTURE_2D, uTexHandle );
glPixelStorei(GL_UNPACK_ROW_LENGTH, img->pitch / img->format->BytesPerPixel);
bool FreeImg;
PixelFormat pixfmt = GetImgPixelFormat( img, FreeImg, width, height );
glPixelStorei(GL_UNPACK_ROW_LENGTH, img->pitch / img->format->BytesPerPixel);
// GLenum glTexFormat = GL_PIXFMT_INFO[pixfmt].internalfmt;
GLenum glImageFormat = GL_PIXFMT_INFO[pixfmt].format;
GLenum glImageType = GL_PIXFMT_INFO[pixfmt].type;