宏修改

This commit is contained in:
daiqingshuang 2025-03-18 11:45:45 +08:00
parent 10f509bd4e
commit 0e0d08c931
4 changed files with 8 additions and 6 deletions

View File

@ -24,7 +24,9 @@ set(MIRAGE_HDR_FORMAT "SG_PIXELFORMAT_RGBA16F" CACHE STRING "Enable HDR format")
set(MIRAGE_PIXEL_FORMAT "SG_PIXELFORMAT_RGBA8" CACHE STRING "Pixel format")
if (MIRAGE_USE_HDR)
add_definitions(-DMIRAGE_USE_HDR)
add_definitions(-DMIRAGE_USE_HDR=1)
else ()
add_definitions(-DMIRAGE_USE_HDR=0)
endif ()
add_definitions(-DMIRAGE_HDR_FORMAT=${MIRAGE_HDR_FORMAT} -DMIRAGE_PIXEL_FORMAT=${MIRAGE_PIXEL_FORMAT})

View File

@ -22,7 +22,7 @@ int main(int argc, char* argv[]) {
auto button = std::make_shared<mbutton>();
border->set_content(button)
.h_alignment(horizontal_alignment::left)
.h_alignment(horizontal_alignment::stretch)
.v_alignment(vertical_alignment::stretch)
.margin({ 10 });

View File

@ -11,7 +11,7 @@ bool windows_window_state::init(ID3D11Device* in_device, IDXGIFactory* in_factor
const auto size = in_window->get_window_frame_size();
const auto window_handle = in_window->get_window_handle();
#ifdef MIRAGE_USE_HDR
#if MIRAGE_USE_HDR
constexpr auto sg_format = MIRAGE_HDR_FORMAT;
#else
constexpr auto sg_format = MIRAGE_PIXEL_FORMAT;
@ -160,7 +160,7 @@ void windows_window_state::rebuild_swapchain(const Eigen::Vector2i& size) {
// 尝试获取IDXGISwapChain4 (Windows 10 1803+)
IDXGISwapChain4* swapChain4 = nullptr;
if (SUCCEEDED(dx_swap_chain->QueryInterface(__uuidof(IDXGISwapChain4), (void**)&swapChain4))) {
#ifdef DEBUG
#if DEBUG
std::cout << "使用IDXGISwapChain4重建交换链" << std::endl;
#endif
@ -284,7 +284,7 @@ void windows_window_state::rebuild_swapchain(const Eigen::Vector2i& size) {
// 释放上下文
context->Release();
#ifdef DEBUG
#if DEBUG
std::cout << "交换链重建成功,新尺寸: " << size.x() << "x" << size.y() << std::endl;
#endif
}

2
third_party/msdfgen vendored

@ -1 +1 @@
Subproject commit 84bfb2a402a3cffa4b44fb75123b37297ff37477
Subproject commit 03889564a50452fa2e0b0a60973b5057001b391b