public static void Draw(Matrix world, Matrix view, Matrix projection, Color newcolor, float scale)
{
// Set BasicEffect parameters.
basicEffect.World = Matrix.CreateScale(scale)*world;
basicEffect.View = view;
basicEffect.Projection = projection;
basicEffect.DiffuseColor = newcolor.ToVector3();
//basicEffect.VertexColorEnabled = true;
basicEffect.Alpha = newcolor.A / 255.0f;
basicEffect.EmissiveColor = newcolor.ToVector3();
//basicEffect.EmissiveColor = new Color(100,100,0).ToVector3();
basicEffect.SpecularColor = new Color(255, 255, 0).ToVector3();
basicEffect.SpecularPower = 10f;
//basicEffect.Texture = Texture2D.FromStream(Game1.device, new FileStream(@"Content\suntexture.png", FileMode.Open));
// basicEffect.TextureEnabled = true;
GraphicsDevice device = basicEffect.GraphicsDevice;
device.DepthStencilState = DepthStencilState.Default;
device.BlendState = BlendState.AlphaBlend;
// Draw the model, using BasicEffect.
foreach (ModelMesh mesh in sphere.Meshes)
{
mesh.Draw();
}
}