Abstract Factory for RenderTextures.
Inheritance: IDisposable
Ejemplo n.º 1
0
 /// <summary>
 ///     Internal constructor.  This class cannot be instantiated externally.
 /// </summary>
 /// <remarks>
 ///     Protected internal because this singleton will actually hold the instance of a subclass
 ///     created by a render system plugin.
 /// </remarks>
 protected internal GLRTTManager(BaseGLSupport glSupport)
 {
     if (_instance == null)
     {
         _instance       = this;
         this._glSupport = glSupport;
     }
 }
Ejemplo n.º 2
0
		/// <summary>
		///     Internal constructor.  This class cannot be instantiated externally.
		/// </summary>
		/// <remarks>
		///     Protected internal because this singleton will actually hold the instance of a subclass
		///     created by a render system plugin.
		/// </remarks>
		protected internal GLRTTManager( BaseGLSupport glSupport )
		{
			if ( _instance == null )
			{
				_instance = this;
				this._glSupport = glSupport;
			}
		}
Ejemplo n.º 3
0
        /// <summary>
        /// Class level dispose method
        /// </summary>
        /// <remarks>
        /// When implementing this method in an inherited class the following template should be used;
        /// protected override void dispose( bool disposeManagedResources )
        /// {
        ///     if ( !isDisposed )
        ///     {
        ///         if ( disposeManagedResources )
        ///         {
        ///             // Dispose managed resources.
        ///         }
        ///
        ///         // There are no unmanaged resources to release, but
        ///         // if we add them, they need to be released here.
        ///     }
        ///
        ///     // If it is available, make the call to the
        ///     // base class's Dispose(Boolean) method
        ///     base.dispose( disposeManagedResources );
        /// }
        /// </remarks>
        /// <param name="disposeManagedResources">True if Unmanaged resources should be released.</param>
        protected virtual void dispose(bool disposeManagedResources)
        {
            if (!isDisposed)
            {
                if (disposeManagedResources)
                {
                    // Dispose managed resources.
                    if (this == GLRTTManager.Instance)
                    {
                        _instance = null;
                    }
                }

                // There are no unmanaged resources to release, but
                // if we add them, they need to be released here.
            }
            isDisposed = true;
        }
Ejemplo n.º 4
0
		/// <summary>
		/// Class level dispose method
		/// </summary>
		/// <remarks>
		/// When implementing this method in an inherited class the following template should be used;
		/// protected override void dispose( bool disposeManagedResources )
		/// {
		/// 	if ( !isDisposed )
		/// 	{
		/// 		if ( disposeManagedResources )
		/// 		{
		/// 			// Dispose managed resources.
		/// 		}
		///
		/// 		// There are no unmanaged resources to release, but
		/// 		// if we add them, they need to be released here.
		/// 	}
		///
		/// 	// If it is available, make the call to the
		/// 	// base class's Dispose(Boolean) method
		/// 	base.dispose( disposeManagedResources );
		/// }
		/// </remarks>
		/// <param name="disposeManagedResources">True if Unmanaged resources should be released.</param>
		protected virtual void dispose( bool disposeManagedResources )
		{
			if ( !isDisposed )
			{
				if ( disposeManagedResources )
				{
					// Dispose managed resources.
					if ( this == GLRTTManager.Instance )
					{
						_instance = null;
					}
				}

				// There are no unmanaged resources to release, but
				// if we add them, they need to be released here.
			}
			isDisposed = true;
		}