Beispiel #1
0
        public static void InitAll(Device device) {
            if (!Directory.GetCurrentDirectory().EndsWith("bin\\Debug")) {
                Directory.SetCurrentDirectory(Directory.GetCurrentDirectory() + "\\bin\\debug");
            }
            Console.WriteLine("Loading effects from: " + Directory.GetCurrentDirectory());
            try {
                BasicFX = new BasicEffect(device, "FX/Basic.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                TreeSpriteFX = new TreeSpriteEffect(device, "FX/TreeSprite.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                InstancedBasicFX = new InstancedBasicEffect(device, "FX/InstancedBasic.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                SkyFX = new SkyEffect(device, "FX/Sky.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                NormalMapFX = new NormalMapEffect(device, "FX/NormalMap.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                DisplacementMapFX = new DisplacementMapEffect(device, "FX/DisplacementMap.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                TerrainFX = new TerrainEffect(device, "FX/Terrain.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                ColorFX = new ColorEffect(device, "FX/color.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
               InstancedNormalMapFX = new InstancedNormalMapEffect(device, "FX/InstancedNormalMap.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }

            try {
                FireFX = new ParticleEffect(device, "FX/Fire.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                RainFX = new ParticleEffect(device, "FX/Rain.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                BuildShadowMapFX = new BuildShadowMapEffect(device, "FX/BuildShadowMap.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                DebugTexFX = new DebugTexEffect(device, "FX/DebugTexture.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                SsaoFX = new SsaoEffect(device, "FX/Ssao.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                SsaoBlurFX = new SsaoBlurEffect(device, "FX/SsaoBlur.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                SsaoNormalDepthFX = new SsaoNormalDepthEffect(device, "FX/SsaoNormalDepth.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                WavesFX = new WavesEffect(device, "FX/Waves.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }

        }
        public static void InitAll(Device device)
        {
            if (!Directory.GetCurrentDirectory().EndsWith("bin\\Debug"))
            {
                Directory.SetCurrentDirectory(Directory.GetCurrentDirectory() + "\\bin\\debug");
            }
            Console.WriteLine("Loading effects from: " + Directory.GetCurrentDirectory());
            try {
                BasicFX = new BasicEffect(device, "FX/Basic.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                TreeSpriteFX = new TreeSpriteEffect(device, "FX/TreeSprite.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                InstancedBasicFX = new InstancedBasicEffect(device, "FX/InstancedBasic.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                SkyFX = new SkyEffect(device, "FX/Sky.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                NormalMapFX = new NormalMapEffect(device, "FX/NormalMap.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                DisplacementMapFX = new DisplacementMapEffect(device, "FX/DisplacementMap.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                TerrainFX = new TerrainEffect(device, "FX/Terrain.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                ColorFX = new ColorEffect(device, "FX/color.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                InstancedNormalMapFX = new InstancedNormalMapEffect(device, "FX/InstancedNormalMap.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }

            try {
                FireFX = new ParticleEffect(device, "FX/Fire.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                RainFX = new ParticleEffect(device, "FX/Rain.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                BuildShadowMapFX = new BuildShadowMapEffect(device, "FX/BuildShadowMap.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                DebugTexFX = new DebugTexEffect(device, "FX/DebugTexture.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                SsaoFX = new SsaoEffect(device, "FX/Ssao.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                SsaoBlurFX = new SsaoBlurEffect(device, "FX/SsaoBlur.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                SsaoNormalDepthFX = new SsaoNormalDepthEffect(device, "FX/SsaoNormalDepth.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            try {
                WavesFX = new WavesEffect(device, "FX/Waves.fxo");
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
        }