From b5f81958df720136e5f6e89ba2212dadb12b2390 Mon Sep 17 00:00:00 2001 From: SepComet <2428390463@qq.com> Date: Thu, 19 Mar 2026 20:12:55 +0800 Subject: [PATCH] =?UTF-8?q?bug=20fix=EF=BC=9A=E6=AD=A3=E6=96=B9=E4=BD=93?= =?UTF-8?q?=E9=81=AE=E6=8C=A1=E5=88=A4=E6=96=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CPU-Software-Renderer/RenderData/Color.h | 6 ++++++ CPU-Software-Renderer/main.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CPU-Software-Renderer/RenderData/Color.h b/CPU-Software-Renderer/RenderData/Color.h index 1aa5ba6..e95739b 100644 --- a/CPU-Software-Renderer/RenderData/Color.h +++ b/CPU-Software-Renderer/RenderData/Color.h @@ -30,5 +30,11 @@ namespace RenderData if (value > 255) return 255; return static_cast(value); } + + static Color Red() { return Color(255, 0, 0, 255); } + static Color Green() { return Color(0, 255, 0, 255); } + static Color Blue() { return Color(0, 0, 255, 255); } + static Color White() { return Color(255, 255, 255, 255); } + static Color Black() { return Color(0, 0, 0, 255); } }; } \ No newline at end of file diff --git a/CPU-Software-Renderer/main.cpp b/CPU-Software-Renderer/main.cpp index 119a337..7e423d5 100644 --- a/CPU-Software-Renderer/main.cpp +++ b/CPU-Software-Renderer/main.cpp @@ -171,7 +171,7 @@ static bool IsFaceVisible(const CubeFace& face, const std::array 0.0f; } int main(int argc, char* argv[])