diff options
Diffstat (limited to 'src/tests/common/test_3d_helpers.h')
| -rw-r--r-- | src/tests/common/test_3d_helpers.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tests/common/test_3d_helpers.h b/src/tests/common/test_3d_helpers.h new file mode 100644 index 0000000..5e9c72c --- /dev/null +++ b/src/tests/common/test_3d_helpers.h @@ -0,0 +1,20 @@ +// This file is part of the 64k demo project. +// Common WGPU initialization for 3D visual tests with surfaces. + +#pragma once + +#include "platform/platform.h" +#include <webgpu.h> + +// Result of WGPU initialization with surface +struct WgpuSurfaceContext { + WGPUDevice device; + WGPUQueue queue; + WGPUSurface surface; + WGPUAdapter adapter; + WGPUTextureFormat format; +}; + +// Initialize WGPU with surface for rendering tests +// Returns context with device/queue/surface/adapter/format +WgpuSurfaceContext init_wgpu_with_surface(PlatformState* platform_state); |
