/// <summary>
        /// Initializes Dualitys embedded default content.
        /// </summary>
        public static void InitDefaultContent()
        {
            if (defaultContentInitialized)
            {
                return;
            }
            Log.Core.Write("Initializing default content..");
            Log.Core.PushIndent();

            var oldResLib = resLibrary.Values.ToArray();

            VertexShader.InitDefaultContent();
            FragmentShader.InitDefaultContent();
            ShaderProgram.InitDefaultContent();
            DrawTechnique.InitDefaultContent();
            Pixmap.InitDefaultContent();
            Texture.InitDefaultContent();
            Material.InitDefaultContent();
            Font.InitDefaultContent();

            // Make a list of all default content available
            foreach (var pair in resLibrary)
            {
                if (oldResLib.Contains(pair.Value))
                {
                    continue;
                }
                defaultContent.Add(pair.Value);
            }

            defaultContentInitialized = true;
            Log.Core.PopIndent();
            Log.Core.Write("..done");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes Duality's embedded default content.
        /// </summary>
        public static void Init()
        {
            if (defaultContentInitialized)
            {
                return;
            }

            VertexShader.InitDefaultContent();
            FragmentShader.InitDefaultContent();
            DrawTechnique.InitDefaultContent();
            Pixmap.InitDefaultContent();
            Texture.InitDefaultContent();
            Material.InitDefaultContent();
            RenderSetup.InitDefaultContent();

            defaultContentInitialized = true;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes all embedded default content in Duality and registers it in the <see cref="ContentProvider"/>.
        /// </summary>
        public static void Init()
        {
            Logs.Core.Write("Initializing default content...");
            Logs.Core.PushIndent();

            VertexShader.InitDefaultContent();
            FragmentShader.InitDefaultContent();
            DrawTechnique.InitDefaultContent();
            Pixmap.InitDefaultContent();
            Texture.InitDefaultContent();
            Material.InitDefaultContent();
            RenderSetup.InitDefaultContent();
            Font.InitDefaultContent();
            AudioData.InitDefaultContent();
            Sound.InitDefaultContent();

            Logs.Core.Write("...done!");
            Logs.Core.PopIndent();
        }