From 472e203d67b714f35d9fa1751efd67f1886b8dc4 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 10 Dec 2008 21:37:56 +0000 Subject: [PATCH] visit multitexture during prepare_scene() too --- panda/src/pgraph/geomNode.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/panda/src/pgraph/geomNode.cxx b/panda/src/pgraph/geomNode.cxx index c70982baef..9f0a8a4a20 100644 --- a/panda/src/pgraph/geomNode.cxx +++ b/panda/src/pgraph/geomNode.cxx @@ -384,9 +384,12 @@ r_prepare_scene(const RenderState *state, if (attrib != (const RenderAttrib *)NULL) { const TextureAttrib *ta; DCAST_INTO_V(ta, attrib); - Texture *texture = ta->get_texture(); - if (texture != (Texture *)NULL) { - texture->prepare(prepared_objects); + int num_stages = ta->get_num_on_stages(); + for (int i = 0; i < num_stages; ++i) { + Texture *texture = ta->get_on_texture(ta->get_on_stage(i)); + if (texture != (Texture *)NULL) { + texture->prepare(prepared_objects); + } } } }