我最后一次尝试的样本。
private void DrawBackground(Model model)
{
RasterizerState stat = new RasterizerState();
stat.CullMode = CullMode.None;
foreach (ModelMesh mesh in model.Meshes)
{
foreach (BasicEffect effect in mesh.Effects)
{
effect.EnableDefaultLighting();
effect.PreferPerPixelLighting = true;
effect.World = Matrix.Identity;
// Use the matrices provided by the game camera
effect.View = gameCamera.ViewMatrix;
effect.Projection = gameCamera.ProjectionMatrix;
}
mesh.Draw();
}