From a3124306bd3c2c17ae67f7ad4c9d3775ee246a69 Mon Sep 17 00:00:00 2001 From: Vectozavr <60608292+vectozavr@users.noreply.github.com> Date: Fri, 5 Nov 2021 17:16:00 +0700 Subject: [PATCH] add switching between opengl and pure programming render mode --- engine/Engine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/Engine.cpp b/engine/Engine.cpp index 93e9de8..87e332b 100644 --- a/engine/Engine.cpp +++ b/engine/Engine.cpp @@ -160,8 +160,8 @@ void Engine::printDebugInfo() const { Vec2D{xPos + width, yPos + height * i}, Vec2D{xPos + width, yPos + height + height * i}, Vec2D{xPos, yPos + height + height * i}, - {static_cast(255 * width / timerWidth), - static_cast(255 * (1 - width / timerWidth)), + {static_cast(255.0 * static_cast(width) / timerWidth), + static_cast(255.0 * (1.0 - static_cast(width) / timerWidth)), 0, 150}); @@ -181,8 +181,8 @@ void Engine::printDebugInfo() const { Vec2D{xPos + width, yPos + height * i}, Vec2D{xPos + width, yPos + height + height * i}, Vec2D{xPos, yPos + height + height * i}, - {static_cast(255 * width / timerWidth), - static_cast(255 * (1 - width / timerWidth)), + {static_cast(255.0 * static_cast(width) / timerWidth), + static_cast(255.0 * (1.0 - static_cast(width) / timerWidth)), 0, 150});