修复初始化投影矩阵时, 没有设置到默认渲染管线

This commit is contained in:
Nanako 2024-11-06 09:57:27 +08:00
parent 4ccc968818
commit 879732da6e

View File

@ -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();