예제 #1
0
파일: Render.cs 프로젝트: xWhitey/openvice
        /// <summary>
        /// Draw single game frame<para/>
        /// Отрисовка одного кадра
        /// </summary>
        public static void RenderFrame()
        {
            // Clearing variables
            // Очистка переменных
            TrisRendered = 0;
            DrawCalls    = 0;

            // Creating empty texture
            // Создание текстуры ошибки
            if (EmptyTexture == 0)
            {
                GenerateEmptyTex();
            }

            // Processing models and textures
            // Обработка моделей и текстур
            ModelManager.SendComplete();
            TextureManager.SendComplete();

            // Verify camera and set up viewport
            // Подгонка камеры и установка вьюпорта
            CameraManager.Sync();
            CameraManager.SetupViewport();

            // Draw single 3D frame
            // Отрисовка 3D данных
            if (Enable3D)
            {
                Render3D();
            }

            // Draw single 2D frame
            // Отрисовка 2D данных
            if (Enable2D)
            {
                Render2D();
            }

            // Processing models and textures
            // Обработка моделей и текстур
            ModelManager.CheckUnused();
            TextureManager.CheckUnused();
        }