From 2f7c8e8e97ffcea52839d0a37ac0062c2daad5e0 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 25 Dec 2015 17:00:40 +0100 Subject: [PATCH 1/2] Fix typo in error message --- panda/src/particlesystem/particleSystem.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/particlesystem/particleSystem.cxx b/panda/src/particlesystem/particleSystem.cxx index c44fd5c0f6..112b27159c 100644 --- a/panda/src/particlesystem/particleSystem.cxx +++ b/panda/src/particlesystem/particleSystem.cxx @@ -249,7 +249,7 @@ spawn_child_system(BaseParticle *bp) { if (_spawn_templates.size() == 0) { physics_cat.error() << "ParticleSystem::spawn_child_system: " - << "no spawn templates presesnt." << endl; + << "no spawn templates present." << endl; return; } From 7d9b5d61f932cc6c1f1ed5631a713fe1e9dfcbfe Mon Sep 17 00:00:00 2001 From: tobspr Date: Fri, 25 Dec 2015 16:58:18 +0100 Subject: [PATCH 2/2] Fix crash when unpacking aligned textures --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 286db3e2f3..9645957d9d 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -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.