mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Fix crash when unpacking aligned textures
This commit is contained in:
parent
2f7c8e8e97
commit
7d9b5d61f9
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user