summaryrefslogtreecommitdiff
path: root/d3d11-resize-draw
diff options
context:
space:
mode:
authorHunter Kvalevog <hunter@kvog.sh>2025-11-30 15:19:29 -0600
committerHunter Kvalevog <hunter@kvog.sh>2025-11-30 15:19:29 -0600
commit727cb1ad987a7a1a6928416ae2c663e843ae8afa (patch)
tree6307921f7fd791edac555126eea963cbdc29ec52 /d3d11-resize-draw
parent4700fd33dad4c5aa20567624d3b6ef12bb7ccfb1 (diff)
d3d11-resize-draw
Diffstat (limited to 'd3d11-resize-draw')
-rw-r--r--d3d11-resize-draw/main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/d3d11-resize-draw/main.cpp b/d3d11-resize-draw/main.cpp
index aa5ff88..f14bf71 100644
--- a/d3d11-resize-draw/main.cpp
+++ b/d3d11-resize-draw/main.cpp
@@ -11,7 +11,6 @@
// --------------------------------------------------------------------------------
// Method 1: Don't do anything special. This is just to highlight the problem.
// --------------------------------------------------------------------------------
-// #define ACTIVE_METHOD 1
// --------------------------------------------------------------------------------
// Method 2: Set CS_VREDRAW | CS_HREDRAW and render in WM_PAINT.
@@ -31,7 +30,7 @@
// If you use WM_TIMER alone, there is a small gap at the side of the window when
// resizing, but it's barely visible.
//
-// If you draw on WM_TIMER and WM_SIZE, there is no bar, but there may be redundant
+// If you draw on WM_TIMER and WM_SIZE, there is no gap, but there may be redundant
// draw calls.
//
// Creating dialogs in WM_TIMER and WM_SIZE doesn't seem to be an issue.
@@ -87,7 +86,7 @@ static void CreateDemoWindow(UINT class_style, WNDPROC wndproc)
WNDCLASSW wcl = { .style = class_style, .lpfnWndProc = wndproc, .hInstance = GetModuleHandleW(0), .lpszClassName = L"d3d11-resize-draw"};
RegisterClassW(&wcl);
- G.hwnd = CreateWindowExW(0, wcl.lpszClassName, wcl.lpszClassName, WS_OVERLAPPEDWINDOW, 0, 0, 1024, 768, 0, 0, 0, 0);
+ G.hwnd = CreateWindowExW(0, wcl.lpszClassName, wcl.lpszClassName, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 512, 512, 0, 0, 0, 0);
Assert(G.hwnd);
}