Axiom.RenderSystems.OpenGL.GLSupport.CreateWindow C# (CSharp) Метод

CreateWindow() публичный Метод

public CreateWindow ( bool autoCreateWindow, GLRenderSystem renderSystem, string windowTitle ) : Axiom.Graphics.RenderWindow
autoCreateWindow bool
renderSystem GLRenderSystem
windowTitle string
Результат Axiom.Graphics.RenderWindow
		public override RenderWindow CreateWindow( bool autoCreateWindow, GLRenderSystem renderSystem, string windowTitle )
		{
			RenderWindow autoWindow = null;

			if ( autoCreateWindow )
			{
				int width = 800;
				int height = 600;
				int bpp = 32;
				bool fullScreen = false;

				ConfigOption optVM = ConfigOptions[ "Video Mode" ];
				string vm = optVM.Value;
				int pos = vm.IndexOf( 'x' );
				if ( pos == -1 )
					throw new Exception( "Invalid Video Mode provided" );
				width = int.Parse( vm.Substring( 0, vm.IndexOf( "x" ) ) );
				height = int.Parse( vm.Substring( vm.IndexOf( "x" ) + 1 ) );

				fullScreen = ( ConfigOptions[ "Full Screen" ].Value == "Yes" );

				NamedParameterList miscParams = new NamedParameterList();
				ConfigOption opt;

				opt = ConfigOptions[ "Color Depth" ];
				if ( opt != null && opt.Value != null && opt.Value.Length > 0 )
					miscParams.Add( "colorDepth", opt.Value );

				opt = ConfigOptions[ "VSync" ];
				if ( opt != null && opt.Value != null && opt.Value.Length > 0 )
				{
					miscParams.Add( "vsync", opt.Value );
					//TODO : renderSystem.WaitForVerticalBlank = (bool)opt.Value;
				}

				opt = ConfigOptions[ "FSAA" ];
				if ( opt != null && opt.Value != null && opt.Value.Length > 0 )
					miscParams.Add( "fsaa", opt.Value );

				miscParams.Add( "title", windowTitle );

				// create the window with the default form as the target
				autoWindow = renderSystem.CreateRenderWindow( windowTitle, width, height, fullScreen, miscParams );
			}

			return autoWindow;
		}