Пример #1
0
        /// <summary>
        /// Shuts down the rendering system
        /// </summary>
        /// <exception cref="InitializationException"></exception>
        internal static void Shutdown()
        {
            if (!initialized)
            {
                throw new InitializationException("The rendering system is not initialized!");
            }

            Renderer2D.Shutdown();
            initialized = false;
        }
Пример #2
0
        /// <summary>
        /// Initializes the rendering system
        /// </summary>
        /// <exception cref="InitializationException"></exception>
        internal static void Init()
        {
            ProfilerTimer.Profile(() =>
            {
                if (initialized)
                {
                    throw new InitializationException("The rendering system is already initialized!");
                }

                RenderingAPI.Init();
                Renderer2D.Init();

                initialized = true;
            });
        }