Exemple #1
0
        /// <summary>
        ///     Internal constructor.  This class cannot be instantiated externally.
        /// </summary>
        internal MaterialManager()
        {
            if (instance == null)
            {
                instance = this;

                this.SetDefaultTextureFiltering(TextureFiltering.Bilinear);
                defaultMaxAniso = 1;

                // Default scheme
                schemes                   = new Dictionary <string, int>();
                activeSchemeIndex         = 0;
                activeSchemeName          = DefaultSchemeName;
                schemes[activeSchemeName] = 0;
            }
        }
        /// <summary>
        ///     Called when the engine is shutting down.
        /// </summary>
        public override void Dispose()
        {
            base.Dispose();

            if (instance == this) {
                instance = null;
            }
        }
        /// <summary>
        ///     Internal constructor.  This class cannot be instantiated externally.
        /// </summary>
        internal MaterialManager()
        {
            if (instance == null) {
                instance = this;

                this.SetDefaultTextureFiltering(TextureFiltering.Bilinear);
                defaultMaxAniso = 1;

                // Default scheme
                schemes = new Dictionary<string, int>();
                activeSchemeIndex = 0;
                activeSchemeName = DefaultSchemeName;
                schemes[activeSchemeName] = 0;
            }
        }