Skip to content
New issue

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

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

Already on GitHub? # to your account

How to draw to a surface with a platform-specific GPU API? #324

Open
nicoburns opened this issue Nov 27, 2024 · 1 comment
Open

How to draw to a surface with a platform-specific GPU API? #324

nicoburns opened this issue Nov 27, 2024 · 1 comment

Comments

@nicoburns
Copy link

The README mentions that surfman allows one to:

draw to a surface with a platform-specific GPU API like Metal

This sounds like it could be really useful to bridge the gap between libraries using OpenGL and libraries using WGPU. But I don't actually see any reference to APIs other than OpenGL in the docs. So my questions are:

  • Is this actually possible?
  • If so, how would one do it?
@jdm
Copy link
Member

jdm commented Nov 27, 2024

I'm not aware of any examples of this, but I believe it would work like this (using macOS with Metal as an example):

  1. create a generic surface
  2. obtain the native surface for the new surface
  3. create a new Metal texture that uses the iosurface as a backing store
  4. possibly ensure that synchronization occurs?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants