Re-Texturing a model

So, I have a kind of strange issue. 



I am working on updating some game object textures and have a simple model (single closed mesh), when the model loads it is textured properly.  However, when I try to apply a texture state to the entire Spatial the original texture is still present. When doing a SceneGraphDump it appears that there are children on the model, but going through all of them reveals nothing but null TextureStates.  The texturing algorithm works correctly, in the sense that if I throw a Quad or Box at it gets textured correctly.



Any thoughts???

Maybe the texture combine mode is set to OFF?

and you surely call updateRenderstate() after setting a new Texturestate? :slight_smile:

I know what you mean basixs, as far as i was able to tell it doesent really matter what combine state you set.

If you set it to off the model will just appear without textures, your not combining different states but you want to override the state. As far as i know this is not possible with the current combine states, the only workaround i see is to apply the new texture to the correct child.



Hmm on reading your post again i guess i mist the part where you said that all texturestates where null.

Ohwell maybe this will give you some idea's.

renanse:  I assume you mean multi-texturing.  I am just trying to replace the current texture, either using the existing texture state or creating a new one.  I looked through the API and don't see anything about setting the texture combine mode on the texture state.



Core-Dump: Yup, definitely calling updateRenderState() once applied.



I did manage to get it working by re-modeling, and working from a single cube; rather than combining several meshes together.  However, I still need to apply the new texture the mesh itself; I would prefer to apply the texture to the entire Node rather than an individual mesh.  But since it works I won't try to fight it too much.