From 879732da6e52b982e93de94c6cf97bec1d43a40c Mon Sep 17 00:00:00 2001 From: Nanako <469449812@qq.com> Date: Wed, 6 Nov 2024 09:57:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E6=8A=95=E5=BD=B1=E7=9F=A9=E9=98=B5=E6=97=B6,=20=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E8=AE=BE=E7=BD=AE=E5=88=B0=E9=BB=98=E8=AE=A4=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E7=AE=A1=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/backend/dx/dx_window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/backend/dx/dx_window.cpp b/src/renderer/backend/dx/dx_window.cpp index 24008ec..f08a946 100644 --- a/src/renderer/backend/dx/dx_window.cpp +++ b/src/renderer/backend/dx/dx_window.cpp @@ -58,6 +58,8 @@ bool dx_window::create_surface(GLFWwindow* in_window) { spdlog::critical("无法创建交换链, 错误: {0}", hr); return false; } + context.set_default_pipeline(dx->get_default_pipeline()); + context.set_rounded_rectangular_pipeline(dx->get_rounded_rect_pipeline()); hr = build_render_target_view(); if (FAILED(hr)) { @@ -65,9 +67,6 @@ bool dx_window::create_surface(GLFWwindow* in_window) { return false; } - context.set_default_pipeline(dx->get_default_pipeline()); - context.set_rounded_rectangular_pipeline(dx->get_rounded_rect_pipeline()); - return true; } @@ -125,6 +124,7 @@ void dx_window::begin_frame() { } } + context.draw_rectangle({ 400, 0 }, { 100, 100 }, { 0, 1, 0, 1 }); context.draw_rounded_rectangle({ 100, 100 }, { 200, 200 }, { 1, 0, 0, 1 }, 10); context.flush();