mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 13:58:40 +00:00
oops - only d3d11 flush on resize
This commit is contained in:
@@ -841,9 +841,11 @@ r_window_begin_frame(OS_Handle window, R_Handle window_equip)
|
|||||||
Vec2S32 resolution = {(S32)(client_rect.x1 - client_rect.x0), (S32)(client_rect.y1 - client_rect.y0)};
|
Vec2S32 resolution = {(S32)(client_rect.x1 - client_rect.x0), (S32)(client_rect.y1 - client_rect.y0)};
|
||||||
|
|
||||||
//- rjf: resolution change
|
//- rjf: resolution change
|
||||||
|
B32 resize_done = 0;
|
||||||
if(wnd->last_resolution.x != resolution.x ||
|
if(wnd->last_resolution.x != resolution.x ||
|
||||||
wnd->last_resolution.y != resolution.y)
|
wnd->last_resolution.y != resolution.y)
|
||||||
{
|
{
|
||||||
|
resize_done = 1;
|
||||||
wnd->last_resolution = resolution;
|
wnd->last_resolution = resolution;
|
||||||
|
|
||||||
// rjf: release screen-sized render target resources, if there
|
// rjf: release screen-sized render target resources, if there
|
||||||
@@ -946,8 +948,11 @@ r_window_begin_frame(OS_Handle window, R_Handle window_equip)
|
|||||||
Vec4F32 clear_color = {0, 0, 0, 0};
|
Vec4F32 clear_color = {0, 0, 0, 0};
|
||||||
d_ctx->ClearRenderTargetView(wnd->framebuffer_rtv, clear_color.v);
|
d_ctx->ClearRenderTargetView(wnd->framebuffer_rtv, clear_color.v);
|
||||||
d_ctx->ClearRenderTargetView(wnd->stage_color_rtv, clear_color.v);
|
d_ctx->ClearRenderTargetView(wnd->stage_color_rtv, clear_color.v);
|
||||||
|
if(resize_done)
|
||||||
|
{
|
||||||
d_ctx->Flush();
|
d_ctx->Flush();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ProfEnd();
|
ProfEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user