Axiom.Demos.TextureFX.CreateScene C# (CSharp) Méthode

CreateScene() public méthode

public CreateScene ( ) : void
Résultat void
		public override void CreateScene()
		{
			// since whole screen is being redrawn every frame, dont bother clearing
			// option works for GL right now, uncomment to test it out.  huge fps increase
			// also, depth_write in the skybox material must be set to on
			//mainViewport.ClearEveryFrame = false;

			// set some ambient light
			scene.TargetRenderSystem.LightingEnabled = true;
			scene.AmbientLight = ColorEx.Gray;

			// create a point light (default)
			Light light = scene.CreateLight( "MainLight" );
			light.Position = new Vector3( 20, 80, 50 );

			CreateScalingPlane();
			CreateScrollingKnot();
			CreateWateryPlane();

			// set up a material for the skydome
			Material skyMaterial = (Material)MaterialManager.Instance.Create( "SkyMat", ResourceGroupManager.DefaultResourceGroupName );
			skyMaterial.Lighting = false;
			// use a cloudy sky
			Pass pass = skyMaterial.GetTechnique( 0 ).GetPass( 0 );
			TextureUnitState textureLayer = pass.CreateTextureUnitState( "clouds.jpg" );
			// scroll the clouds
			textureLayer.SetScrollAnimation( 0.15f, 0 );

			// create the skydome
			scene.SetSkyDome( true, "SkyMat", -5, 2 );
		}