Fix crash when unpacking aligned textures

This commit is contained in:
tobspr 2015-12-25 16:58:18 +01:00 committed by rdb
parent 2f7c8e8e97
commit 7d9b5d61f9

View File

@ -12113,6 +12113,10 @@ extract_texture_image(PTA_uchar &image, size_t &page_size,
return false;
#else
// Make sure the GL driver does not align textures, otherwise we get corrupt
// memory, since we don't take alignment into account.
glPixelStorei(GL_PACK_ALIGNMENT, 1);
if (target == GL_TEXTURE_CUBE_MAP) {
// A cube map, compressed or uncompressed. This we must extract
// one page at a time.