Fix crashes in RageDisplay_OGL::UpdateTexture when the surface and texture
formats differ.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user