Ejemplo n.º 1
0
        public void RenderizzaCieloStellato(float time, LogiX_Engine lxe, float TexDimension)
        {
            lxe.SetCullMode(CullMode.Clockwise);
            effect.Begin(FX.None);
            matrix = Matrix.Scaling(new Vector3(1000f,1000f,1000f)) * LogiX_Engine.Device.Transform.View * LogiX_Engine.Device.Transform.Projection;
            Matrix.TransposeMatrix(matrix);
            effect.SetValue(effectHandles[1], matrix);
            effect.SetValue(effectHandles[2], time/3);
            effect.SetValue(effectHandles[3], baseTexture[0]);
            effect.SetValue(effectHandles[4], baseTexture[1]);
            effect.SetValue(effectHandles[5], TexDimension);
            effect.CommitChanges();
            effect.BeginPass(0);

            model.DrawSubset(0);

            effect.EndPass();
            effect.End();
            lxe.SetCullMode(CullMode.CounterClockwise);
        }
Ejemplo n.º 2
0
 public void RenderizzaAlone(LogiX_Engine lxe, Camera cam)
 {
     lxe.SetCullMode(CullMode.Clockwise);
     lxe.SetLightMode(true, true);
     lxe.SetAlphaMode();
     light.Direction = cam.Position;
     light.Enabled = true;
     light.SetDirectionalLight();
     model.Scaling = new VertexData(0.48f, 0.48f, 0.48f);
     model.meshTexture = null;
     XTexture.ResetTextures();
     model.SetModelMatrices();
     Alone.SetMaterial();
     model.DrawSubset(0);
     XMaterial.ResetMaterials();
     model.UnSetModelMatrices();
     light.Enabled = false;
     light.SetDirectionalLight();
     lxe.UnSetAlphaMode();
     lxe.SetLightMode(true, false);
     lxe.SetCullMode(CullMode.CounterClockwise);
 }
Ejemplo n.º 3
0
 public void RenderizzaAtmosfera(float time, float RaggioAtmosferaRispettoPianeta, XMaterial mat, LogiX_Engine lxe)
 {
     lxe.SetAlphaMode();
     lxe.SetCullMode(CullMode.Clockwise);
     lxe.AmbientLight = Color.FromArgb(255, 255, 255);
     lxe.SetLightMode(true, true);
     XTexture.ResetTextures();
     TransformAtm(time, RaggioAtmosferaRispettoPianeta);
     mat.SetMaterial();
     model.DrawSubset(0);
     XMaterial.ResetMaterials();
     RestoreWorld();
     lxe.AmbientLight = Color.FromArgb(0, 0, 0);
     lxe.SetCullMode(CullMode.CounterClockwise);
     lxe.UnSetAlphaMode();
     lxe.SetLightMode(true, false);
 }
Ejemplo n.º 4
0
 public void RenderizzaSatellite(float time, LogiX_Engine lxe, bool hd)
 {
     switch (isdefault)
     {
         case true:
             lxe.AmbientLight = Color.FromArgb(0, 0, 0);
             TransformPlanet(time, true);
             if (!hd)
             {
                 model.meshTexture[0] = texture.DXTexture;
                 model.RenderWithoutMatrices(0);
             }
             else
             {
                 model1.meshTexture[0] = texture.DXTexture;
                 model1.RenderWithoutMatrices(0);
             }
             lxe.AmbientLight = Color.FromArgb(0, 0, 0);
             RestoreWorld();
             break;
         case false:
             lxe.AmbientLight = Color.FromArgb(0, 0, 0);
             //XMaterial.ResetMaterials();
             TransformPlanet(time, false);
             if (!hd)
             {
                 model.meshTexture[0] = texture.DXTexture;
                 model.RenderWithoutMatrices(0);
             }
             else
             {
                 model1.meshTexture[0] = texture.DXTexture;
                 model1.RenderWithoutMatrices(0);
             }
             lxe.AmbientLight = Color.FromArgb(0, 0, 0);
             RestoreWorld();
             break;
     }
 }
Ejemplo n.º 5
0
 public void RenderizzaPianeta(float time, LogiX_Engine lxe, bool hd)
 {
     lxe.AmbientLight = Color.FromArgb(0, 0, 0);
     TransformPlanet(time);
     if (!hd)
     {
         model.meshTexture[0] = texture.DXTexture;
         model.RenderWithoutMatrices(0);
     }
     else
     {
         model1.meshTexture[0] = texture.DXTexture;
         model1.RenderWithoutMatrices(0);
     }
     XMaterial.ResetMaterials();
     XTexture.ResetTextures();
     lxe.AmbientLight = Color.FromArgb(0, 0, 0);
     RestoreWorld();
 }