summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README28
-rw-r--r--win-resize-mt/win-resize-mt.c9
-rw-r--r--win-resize-st/win-resize-st.c5
3 files changed, 23 insertions, 19 deletions
diff --git a/README b/README
index 6852f7b..58ffe41 100644
--- a/README
+++ b/README
@@ -1,13 +1,15 @@
--------------------------------------------------------------------------------
-kvog-git/demos
--------------------------------------------------------------------------------
-
-This repository contains a collection of small demo applications that don’t
-deserve their own repositories.
-
-These demos are for educational and experimental purposes only. They are not
-guaranteed to be correct, performant, safe, or (generally speaking) good.
-
--------------------------------------------------------------------------------
-win-resize | Drawing while resizing on Windows
--------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
+kvog-git/demos
+-------------------------------------------------------------------------------
+
+This repository contains a collection of small demo applications that don’t
+deserve their own repositories.
+
+These demos are for educational and experimental purposes only. They are not
+guaranteed to be correct, performant, safe, or (generally speaking) good.
+
+-------------------------------------------------------------------------------
+win-resize-mt | Drawing while resizing on Windows (multi threaded)
+-------------------------------------------------------------------------------
+win-resize-st | Drawing while resizing on Windows (single threaded)
+-------------------------------------------------------------------------------
diff --git a/win-resize-mt/win-resize-mt.c b/win-resize-mt/win-resize-mt.c
index 2f9dd4e..272be77 100644
--- a/win-resize-mt/win-resize-mt.c
+++ b/win-resize-mt/win-resize-mt.c
@@ -1,8 +1,11 @@
// ================================================================================================
// Example of how to draw while resizing / moving a window on Windows in C.
//
-// This demo uses a dedicated render thread with basic synchronization with the event loop. There
-// is a single-threaded version called win-resize/ if that's more your style.
+// Window contents are rendered via GDI, but the behavior is the same no matter what graphics API
+// you use. The original version of this demo (on old-20260427 branch) used D3D11.
+//
+// This demo uses a multiple threads. There's a multi threaded version called win-resize-mt if
+// that's more your style.
//
// Build (MSVC):
// > cl /W4 /Od /Zi win-resize-mt.c /Fe:win-resize-mt.exe
@@ -10,7 +13,7 @@
// $ cc -o win-resize-mt.exe -Wall -Wextra -Wpedantic -O0 -g win-resize-mt.c -ldwmapi -lgdi32
//
// Changelog:
-// XX/XX/XXXX: Initial release
+// 5/21/2026: Initial release
//
// License:
// Copyright (c) 2026 Hunter Kvalevog
diff --git a/win-resize-st/win-resize-st.c b/win-resize-st/win-resize-st.c
index 5aace81..fe6cf97 100644
--- a/win-resize-st/win-resize-st.c
+++ b/win-resize-st/win-resize-st.c
@@ -4,9 +4,8 @@
// Window contents are rendered via GDI, but the behavior is the same no matter what graphics API
// you use. The original version of this demo (on old-20260427 branch) used D3D11.
//
-// Pretty much all modern Direct3D Windows apps use a render thread and therefore don't have to
-// deal with this problem. That strategy doesn't work with APIs that have weird thread affinity
-// issues (OpenGL), so this is one way of doing it without multithreading.
+// This demo uses a single thread. There's a multi threaded version called win-resize-mt if that's
+// more your style.
//
// Build (MSVC):
// > cl /W4 /Od /Zi win-resize-st.c /Fe:win-resize-st.exe