Exemplo n.º 1
0
        /// <summary>
        /// Opens up a window for Duality to render into. This also initializes the part of Duality that requires a
        /// valid rendering context. Should be called before performing any rendering related operations with Duality.
        /// </summary>
        public static INativeWindow OpenWindow(WindowOptions options)
        {
            if (!initialized)
            {
                throw new InvalidOperationException("Can't initialize graphics / rendering because Duality itself isn't initialized yet.");
            }

            INativeWindow window = graphicsBack.CreateWindow(options);

            InitPostWindow();

            return(window);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Opens up a window for Duality to render into. This also initializes the part of Duality that requires a
        /// valid rendering context. Should be called before performing any rendering related operations with Duality.
        /// </summary>
        public static INativeWindow OpenWindow(WindowOptions options)
        {
            if (!initialized)
            {
                throw new InvalidOperationException("Can't initialize graphics / rendering because Duality itself isn't initialized yet.");
            }

            Logs.Core.Write("Opening Window...");
            Logs.Core.PushIndent();
            INativeWindow window = graphicsBack.CreateWindow(options);

            Logs.Core.PopIndent();

            InitPostWindow();

            return(window);
        }