Inheritance: IWindowEventListener
コード例 #1
0
ファイル: Tutorial1.cs プロジェクト: WolfgangSt/axiom
		public bool Setup( IGraphicsContext glContext, int width, int height )
		{
			// instantiate the Root singleton
			engine = Root.Instance;

			// add event handlers for frame events
			engine.FrameStarted += OnFrameStarted;
			engine.FrameRenderingQueued += OnFrameRenderingQueued;
			engine.FrameEnded += OnFrameEnded;

			Root.Instance.Initialize( false, "Axiom Engine Demo Window" );

			NamedParameterList miscParams = new NamedParameterList();
			miscParams.Add( "externalWindowInfo", glContext );
			miscParams.Add( "externalWindow", true );
			window = Root.Instance.CreateRenderWindow( "Droid.Demo", width, height, true, miscParams );

			TechDemoListener rwl = new TechDemoListener( window );
			WindowEventMonitor.Instance.RegisterListener( window, rwl );

			SetupResources();

			ChooseSceneManager();
			CreateCamera();
			CreateViewports();

			this.viewport.BackgroundColor = ColorEx.SteelBlue;

			// set default mipmap level
			TextureManager.Instance.DefaultMipmapCount = 5;

			// Create any resource listeners (for loading screens)
			this.CreateResourceListener();
			// Load resources
			this.LoadResources();

			ShowDebugOverlay( true );

			//CreateGUI();


			//input = SetupInput();

			// call the overridden CreateScene method
			CreateScene();
			return true;
		}
コード例 #2
0
ファイル: TechDemo.cs プロジェクト: WolfgangSt/axiom
		public virtual bool Setup()
		{
			// instantiate the Root singleton
			//engine = new Root( "AxiomEngine.log" );
			engine = Root.Instance;

			// add event handlers for frame events
			engine.FrameStarted += OnFrameStarted;
			engine.FrameRenderingQueued += OnFrameRenderingQueued;
			engine.FrameEnded += OnFrameEnded;

			window = Root.Instance.Initialize( true, "Axiom Engine Demo Window" );
			TechDemoListener rwl = new TechDemoListener( window );
			WindowEventMonitor.Instance.RegisterListener( window, rwl );

			ChooseSceneManager();

			CreateCamera();

			CreateViewports();

			// set default mipmap level
			TextureManager.Instance.DefaultMipmapCount = 5;

			// Create any resource listeners (for loading screens)
			this.CreateResourceListener();
			// Load resources

			this.LoadResources();

			ShowDebugOverlay( showDebugOverlay );

			//CreateGUI();


			input = SetupInput();

			// call the overridden CreateScene method

			CreateScene();
			return true;
		}