visit multitexture during prepare_scene() too

This commit is contained in:
David Rose 2008-12-10 21:37:56 +00:00
parent 4d09989995
commit 472e203d67

View File

@ -384,9 +384,12 @@ r_prepare_scene(const RenderState *state,
if (attrib != (const RenderAttrib *)NULL) { if (attrib != (const RenderAttrib *)NULL) {
const TextureAttrib *ta; const TextureAttrib *ta;
DCAST_INTO_V(ta, attrib); DCAST_INTO_V(ta, attrib);
Texture *texture = ta->get_texture(); int num_stages = ta->get_num_on_stages();
if (texture != (Texture *)NULL) { for (int i = 0; i < num_stages; ++i) {
texture->prepare(prepared_objects); Texture *texture = ta->get_on_texture(ta->get_on_stage(i));
if (texture != (Texture *)NULL) {
texture->prepare(prepared_objects);
}
} }
} }
} }