Skip to content

Expose WinUI SwapChainPanel as a surface source type #480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 2, 2025

Conversation

leksiso
Copy link
Contributor

@leksiso leksiso commented May 8, 2025

wgpu added support for WinUI SwapChainPanels in gfx-rs/wgpu#4191.

This PR makes the feature usable through wgpu-native.

Example usage:

  WGPUSurfaceSourceSwapChainPanel surfaceSource = {
      .chain = {.sType = (WGPUSType)WGPUSType_SurfaceSourceSwapChainPanel },
      .panelNative = swapChainPanel().as<ISwapChainPanelNative>().get()
  };

  WGPUSurfaceDescriptor surfaceDescriptor = {
      .nextInChain = &surfaceSource.chain,
  };

  WGPUSurface surface = wgpuInstanceCreateSurface(instance, &surfaceDescriptor);

@almarklein
Copy link
Collaborator

CI does not agree 😉

@leksiso
Copy link
Contributor Author

leksiso commented May 31, 2025

CI does not agree 😉

Fair enough. It should agree now

@almarklein
Copy link
Collaborator

Thanks!

@almarklein almarklein merged commit d823888 into gfx-rs:trunk Jun 2, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants