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

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -