Open vico93 opened 1 month ago
Self-explanatory
Here's a working version with FPC. You need to copy the webgpu_dawn.dll
next to the compiled exe.
https://gist.github.com/Coldzer0/ef1d0447ac596de2bb431e21f6e6c8f3
@vico93 Beyond the changes for FPC dialect mentioned in Coldzer0 gist, I gave a quick try with latest Lazarus, and the import unit generated by Chet did not seem to be compatible with FPC dialect either, even in Delphi mode ("Error: An import name is required")
So the answer is "not for the moment", and I don't know enough about FPC dialect to make it work.
That said, the import unit will likely evolve to use dynamic loading, so that you can specify the dll, and easily switch between various builds and implementations.
@vico93 Beyond the changes for FPC dialect mentioned in Coldzer0 gist, I gave a quick try with latest Lazarus, and the import unit generated by Chet did not seem to be compatible with FPC dialect either, even in Delphi mode ("Error: An import name is required")
So the answer is "not for the moment", and I don't know enough about FPC dialect to make it work.
That said, the import unit will likely evolve to use dynamic loading, so that you can specify the dll, and easily switch between various builds and implementations.
I tested it with latest FPC build and works fine on my side.
I would recommend to use https://github.com/LongDirtyAnimAlf/fpcupdeluxe to install FPC and Lazarus from trunk.
Just committed an updated header conversion, this time with dynamic loading. This one builds fine under Lazarus here.
You now need to explicitly load a particular DLL, but this should simplify testing the various builds and implementations (previous static conversion would fail against wgpu-native f.i.).
Self-explanatory