Skip to content

SogoCZE/jai_wgpu_native

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jai wgpu_native Bindings

WIP Jai Bindings for wgpu_native.

Hello Triangle

Warning: this example is far from being polished!

  • Put wgpu folder in your module folder
  • Compile with jai main.jai
  • Run bin/jai_wgpu

Linux

I don´t have a Linux machine so the linux surface creation is not done. PR welcome.

Mac

You need to add two extra bindings intro SDL module for Metal. Insert:

SDL_MetalView :: struct{}
SDL_Metal_CreateView :: (window: *SDL_Window) -> *SDL_MetalView #foreign SDL2;
SDL_Metal_GetLayer :: (metal_view: *SDL_MetalView) -> *void #foreign SDL2;

Into modules/SDL/SDL_render.jai after line 100.

You will also need the newest SDL2 dylib the one shipped with the Jai compiler is too old (as of 28.2.2023).

About

WIP Jai Bindings for wgpu_native.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published