Comments (8)
i reopened it. Hope you do not mind..
from go-webgpu.
I dont know how to do the Cocoa handles. am mostly pure golang developer
I know that in the GIOUI code base they recently had work done for Platform Views, which is slightly related.
https://todo.sr.ht/~eliasnaur/gio/428
wish i could be more help.
from go-webgpu.
The triangle example works on Mac still... so might be gio related.
apple@x-MacBook-Pro-2 triangle % go build .
apple@x-MacBook-Pro-2 triangle % ls
main.go surface_android.go surface_wayland_linux.go surface_x11_linux.go
shader.wgsl surface_darwin.go surface_windows.go triangle
apple@x-MacBook-Pro-2 triangle % ./triangle
[go-webgpu] [Warn] Surface does not support present mode: Mailbox, falling back to FIFO
[go-webgpu] [Warn] Surface does not support present mode: Mailbox, falling back to FIFO
[go-webgpu] [Warn] Surface does not support present mode: Mailbox, falling back to FIFO
from go-webgpu.
sorry i just noticed that darwin is not implemented yet: https://github.com/rajveermalviya/go-webgpu/blob/main/examples/gio-windowing/surface_darwin.go#L11
from go-webgpu.
i just pulled latest.
Now for gio-windowing example i get:
./main.go:70:34: undefined: getSurfaceDescriptor
Much less errors.
from go-webgpu.
yep, it's because gio-windowing example currently lacks support for darwin. I mainly have it in just to showcase android support.
you should instead be able to run glfw-based examples (triangle, cube, boids) on darwin.
would really appreciate if someone with a mac is willing to shoot a PR.
I haven't looked into how gio exposes Cocoa handles, doubt it would be much different than how glfw does it.
from go-webgpu.
while implementing it (see #199) it seems this is not possible with Gio's current api.
Gio's current api prevents using it as a standalone windowing library (atleast for macos & i assume ios too),
because the metal layer provided by ViewEvent cannot be resized
from a separate goroutine (non main thread).
we can merge #199 as is, but that would not be good idea as resizing the window will fail.
from go-webgpu.
the latest GIO should help and you can also use it as standalone.
https://github.com/gioui/gio-example/blob/main/glfw is a simple example doing it which might help ?
from go-webgpu.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-webgpu.