BasicEffect effect = new BasicEffect(Device, null);
effect.TextureEnabled = true;
effect.Texture = texture;
model.Meshes[0].MeshParts[0].Effect = effect;
it works, but if I do this:
BasicEffect effect = (BasicEffect)model.Meshes[0].MeshParts[0].Effect;
effect.TextureEnabled = true;
effect.Texture = texture;
it doesn't - the model shows up as black. Why is that?
Thanks in advance.