visual studio 2010 - C# Xna 4.0 foreach loop 3d Model not loading -
i have tried making drawmodel method using foreach loops:
void drawmodel(model model, vector3 modelposition) { foreach (modelmesh mesh in model.meshes) { foreach (basiceffect effect in mesh.effects) { effect.lightingenabled = true; effect.enabledefaultlighting(); effect.preferperpixellighting = true; effect.world = matrix.createtranslation(modelposition); effect.projection = cameraprojectionmatrix; effect.view = cameraviewmatrix; } mesh.draw(); } }
any ideas on missing?
Comments
Post a Comment