Commit Graph
6 Commits
Author SHA1 Message Date
Behdad Esfahbod 8aaa51013b [gpu_demo] Silence compiler warnings 2026-05-04 09:50:11 -06:00
Behdad Esfahbod a45382c12c [gpu_demo] Fix build in Windows
Don't use std::min/std::max.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5971
2026-05-04 09:50:11 -06:00
Behdad Esfahbod ed9bdd1031 [util/gpu] Silence LOGI output when --output-file is set
Scripted / CI use of hb-gpu -o wants clean stderr.  Gate LOGI on
a hb_gpu_demo_quiet flag that hb-gpu flips to 1 when an output
file is specified, so font stats, help text, and toggle-vsync
chatter all stay out of the way.

LOGW / LOGE are intentionally unaffected -- warnings and fatal
errors should always surface regardless of quiet mode.

Assisted-by: Claude <noreply@anthropic.com>
2026-04-14 23:01:41 -06:00
Behdad Esfahbod 6828ad2865 [util/gpu] Route LOGI to stderr
LOGI is informational output (help text, toggle state, fps).  It
belongs on stderr: that keeps stdout available for program output
(e.g. --output-file=- piping a PPM through a pipeline), and it
matches LOGW/LOGE which already go to stderr.

No user-visible change in normal (windowed) runs; stderr shows up
in the same terminal as stdout by default.

Assisted-by: Claude <noreply@anthropic.com>
2026-04-14 20:48:17 -06:00
Behdad EsfahbodandClaude Opus 4.6 29b5fee519 [gpu] Add D3D11 demo (MinGW cross-compile, Wine)
D3D11 renderer using Win32 windowing and runtime HLSL compilation.
Cross-compiles with MinGW, runs under Wine with DXVK.

Also fixes demo-common.h to guard GL/GLFW includes behind
HB_GPU_NO_GLFW, renames near/far to znear/zfar in demo-view
(reserved on Windows), and adds QueryPerformanceCounter timer
for Win32.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 22:17:13 -06:00
Behdad EsfahbodandClaude Opus 4.6 03c2688436 [gpu] Add GPU demo app in util/gpu
Port the glyphy-demo to use the hb-gpu API.  Builds as util/hb-gpu
and requires GLEW, GLFW3, and OpenGL 3.3.  Includes default text
and embedded font for quick testing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 18:30:13 -06:00