diff options
| author | Yong He <yonghe@outlook.com> | 2021-03-11 09:14:30 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-11 09:14:30 -0800 |
| commit | a07455c175db33d8d95bc5cd83738808d74cd105 (patch) | |
| tree | 02660537db912b7d48f34c751dc5731b88daa0db /examples/shader-toy/main.cpp | |
| parent | 6cbd9d68a03f0a22305d4e224a3da7633b23de38 (diff) | |
Add Linux support to `platform` and `gfx`. (#1744)
Diffstat (limited to 'examples/shader-toy/main.cpp')
| -rw-r--r-- | examples/shader-toy/main.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/shader-toy/main.cpp b/examples/shader-toy/main.cpp index 70bff13a8..27fdf4daa 100644 --- a/examples/shader-toy/main.cpp +++ b/examples/shader-toy/main.cpp @@ -442,9 +442,7 @@ Result initialize() swapchainDesc.height = gWindowHeight; swapchainDesc.imageCount = kSwapchainImageCount; swapchainDesc.queue = gQueue; - gfx::WindowHandle windowHandle; - memcpy(&windowHandle, &gWindow->getNativeHandle(), sizeof(windowHandle)); - gSwapchain = gDevice->createSwapchain(swapchainDesc, windowHandle); + gSwapchain = gDevice->createSwapchain(swapchainDesc, gWindow->getNativeHandle().convert<gfx::WindowHandle>()); IFramebufferLayout::AttachmentLayout renderTargetLayout = {gSwapchain->getDesc().format, 1}; IFramebufferLayout::AttachmentLayout depthLayout = {gfx::Format::D_Float32, 1}; |
