예제 #1
0
 public override void Dispose()
 {
     if (Root.Instance != null && Root.Instance.RenderSystem != null)
     {
         GLESRenderSystem rendersystem = (GLESRenderSystem)Root.Instance.RenderSystem;
         //Javax.Microedition.Khronos.Egl.EGLContext.EGL11.EglDestroyContext( _eglDisplay, _context );
         rendersystem.UnregisterContext(this);
     }
 }
예제 #2
0
        /// <summary>
        /// </summary>
        /// <param name="autoCreateWindow"> </param>
        /// <param name="renderSystem"> </param>
        /// <param name="windowTitle"> </param>
        /// <returns> </returns>
        public override RenderWindow CreateWindow(bool autoCreateWindow, GLESRenderSystem renderSystem, string windowTitle)
        {
            RenderWindow window = null;

            if (autoCreateWindow)
            {
                var  miscParams = new NamedParameterList();
                bool fullScreen = false;
                int  width      = 640;
                int  height     = 480;
                if (_options["Full Screen"] != null)
                {
                    fullScreen = _options["Full Screen"].Value == "Yes";
                }
                if (_options["Display Frequency"] != null)
                {
                    miscParams["displayFrequency"] = _options["Display Frequency"].Value;
                }
                if (_options["Video Mode"] != null)
                {
                    string val    = _options["Video Mode"].Value;
                    int    xIndex = val.IndexOf("x");

                    if (xIndex != -1)
                    {
                        width  = int.Parse(val.Substring(0, xIndex));
                        height = int.Parse(val.Substring(xIndex + 1));
                    }
                }
                if (_options["FSAA"] != null)
                {
                    miscParams["FSAA"] = _options["FSAA"].Value;
                }

                window = renderSystem.CreateRenderWindow(windowTitle, width, height, fullScreen, miscParams);
            }
            return(window);
        }
예제 #3
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="autoCreateWindow"></param>
		/// <param name="renderSystem"></param>
		/// <param name="windowTitle"></param>
		/// <returns></returns>
		public override RenderWindow CreateWindow( bool autoCreateWindow, GLESRenderSystem renderSystem, string windowTitle )
		{
			RenderWindow window = null;
			if ( autoCreateWindow )
			{
				NamedParameterList miscParams = new NamedParameterList();
				bool fullScreen = false;
				int width = 640;
				int height = 480;
				if ( _options[ "Full Screen" ] != null )
				{
					fullScreen = _options[ "Full Screen" ].Value == "Yes";
				}
				if ( _options[ "Display Frequency" ] != null )
				{
					miscParams[ "displayFrequency" ] = _options[ "Display Frequency" ].Value;
				}
				if ( _options[ "Video Mode" ] != null )
				{
					string val = _options[ "Video Mode" ].Value;
					int xIndex = val.IndexOf( "x" );

					if ( xIndex != -1 )
					{
						width = int.Parse( val.Substring( 0, xIndex ) );
						height = int.Parse( val.Substring( xIndex + 1 ) );
					}
				}
				if ( _options[ "FSAA" ] != null )
				{
					miscParams[ "FSAA" ] = _options[ "FSAA" ].Value;
				}

				window = renderSystem.CreateRenderWindow( windowTitle, width, height, fullScreen, miscParams );
			}
			return window;
		}
예제 #4
0
 /// <summary>
 ///   Initializes the plugin.
 /// </summary>
 public void Initialize()
 {
     this._renderSystem = new GLESRenderSystem();
     Root.Instance.RenderSystems.Add("OpenGLES", this._renderSystem);
 }
예제 #5
0
 /// <summary>
 /// </summary>
 /// <param name="autoCreateWindow"> </param>
 /// <param name="renderSystem"> </param>
 /// <param name="windowTitle"> </param>
 /// <returns> </returns>
 public abstract RenderWindow CreateWindow(bool autoCreateWindow, GLESRenderSystem renderSystem, string windowTitle);