Exemplo n.º 1
0
        protected override bool Configure()
		{
			    RenderSystemList renderSystems = root.GetAvailableRenderers();
                IEnumerator<RenderSystem> enumerator = renderSystems.GetEnumerator();

                // jako stan startowy moze zostac wybrany tylko directx system
                RenderSystem d3dxSystem = null;
				
                while (enumerator.MoveNext())
                {
                    RenderSystem renderSystem = enumerator.Current;
                    if (renderSystem.Name.Contains("Direct"))
                    {
                        d3dxSystem = renderSystem;
                        break;
                    }
                }

                
                root.RenderSystem = d3dxSystem;

             


                string fullScreen = "No";
                string videoMode = "800 x 600 @ 32-bit colour";

                d3dxSystem.SetConfigOption("Full Screen", fullScreen);
                d3dxSystem.SetConfigOption("Video Mode", videoMode);
                d3dxSystem.SetConfigOption("VSync", "No");
		        window = root.Initialise(true, "Wings Of Fury 2 - test");
                
            
               

                windowHeight = window.Height;
                windowWidth = window.Width;
                
         //       Resize += new EventHandler(OgreForm_Resize);
           //     root.SaveConfig();
                return true;
		}