/// <summary> /// Default constructor /// </summary> public SpherePlanetReflectiveOceanRenderer( string effectPath, string waterAnimationPath ) { Arguments.CheckNotNullOrEmpty( effectPath, "effectPath" ); Arguments.CheckNotNull( waterAnimationPath, "waterAnimationPath" ); m_Effect = new EffectAssetHandle( effectPath, true ); m_Technique = new TechniqueSelector( m_Effect, "DefaultTechnique" ); using ( WaveAnimation animation = ( WaveAnimation )AssetManager.Instance.Load( waterAnimationPath ) ) { m_WaveAnimation = new AnimatedTexture2d( animation.ToTextures( true ), 5.0f ); } }
/// <summary> /// Default constructor /// </summary> public SpherePlanetOceanRenderer( ) { m_Effect = new EffectAssetHandle( "Effects/Planets/sphereOcean.cgfx", true ); m_Effect.OnReload += Effect_OnReload; m_Technique = new TechniqueSelector( m_Effect, "DefaultTechnique" ); using ( WaveAnimation animation = ( WaveAnimation )AssetManager.Instance.Load( "Ocean/SimpleWater.waves.bin" ) ) { m_WaveAnimation = new AnimatedTexture2d( animation.ToTextures( true ), 5.0f ); } // Generate cached sphere for rendering the planet Graphics.Draw.StartCache( ); Graphics.Draw.Sphere( null, Point3.Origin, 10.0f, 80, 80 ); m_OceanGeometry = Graphics.Draw.StopCache( ); }
/// <summary> /// Default constructor /// </summary> public SpherePlanetOceanRenderer( string effectPath, string waterAnimationPath ) { Arguments.CheckNotNull( effectPath, "effectPath" ); Arguments.CheckNotNull( waterAnimationPath, "waterAnimationPath" ); m_Effect = new EffectAssetHandle( effectPath, true ); // m_Effect.OnReload += Effect_OnReload; m_Technique = new TechniqueSelector( m_Effect, "DefaultTechnique" ); using ( WaveAnimation animation = ( WaveAnimation )AssetManager.Instance.Load( waterAnimationPath ) ) { m_WaveAnimation = new AnimatedTexture2d( animation.ToTextures( true ), 5.0f ); } // Generate cached sphere for rendering the planet Graphics.Draw.StartCache( ); Graphics.Draw.Sphere( null, Point3.Origin, 10.0f, 80, 80 ); m_OceanGeometry = Graphics.Draw.StopCache( ); }