mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
assimp: Fix memory corruption in load_texture_stage()
This commit is contained in:
parent
d8a537b59b
commit
09a81e0d68
@ -291,10 +291,10 @@ load_texture_stage(const aiMaterial &mat, const aiTextureType &ttype, CPT(Textur
|
|||||||
unsigned int uvindex;
|
unsigned int uvindex;
|
||||||
float blend;
|
float blend;
|
||||||
aiTextureOp op;
|
aiTextureOp op;
|
||||||
aiTextureMapMode mapmode;
|
aiTextureMapMode mapmode[3];
|
||||||
|
|
||||||
for (size_t i = 0; i < mat.GetTextureCount(ttype); ++i) {
|
for (size_t i = 0; i < mat.GetTextureCount(ttype); ++i) {
|
||||||
mat.GetTexture(ttype, i, &path, &mapping, nullptr, &blend, &op, &mapmode);
|
mat.GetTexture(ttype, i, &path, &mapping, nullptr, &blend, &op, mapmode);
|
||||||
|
|
||||||
if (AI_SUCCESS != mat.Get(AI_MATKEY_UVWSRC(ttype, i), uvindex)) {
|
if (AI_SUCCESS != mat.Get(AI_MATKEY_UVWSRC(ttype, i), uvindex)) {
|
||||||
// If there's no texture coordinate set for this texture, assume that
|
// If there's no texture coordinate set for this texture, assume that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user