API Documentation: https://ibilon.github.io/hxwgpu/
hxwgpu is a work in progress haxe/hxcpp wrapper around wgpu-native, allowing the use of the WebGPU API on desktop.
The library is null safe and compatible cppia, see cppia_host.hxml
and the samples on how to use cppia.
Currently only tested on linux with X11.
Plans:
- Complete the API
- Test support with GLFW on windows and mac
hxwgpu requires building wgpu-native, which needs a working rust installation, see https://github.com/gfx-rs/wgpu/wiki/Getting-Started#prerequisites for more details on the requirements.
Make sure to clone this repository with --recursive
, or download the submodule with git submodule update --init
.
The library follows the API from wgpu-rs with a couple exceptions:
- Functions and members use camelCase instead of snake_case
Adapter::request
is replaced withnew Adapter
AdapterInfo
is not availabledevice.createBufferWithData
is replaced withdevice.createBufferWithFloat32Data
,device.createBufferWithUInt16Data
anddevice.createBufferWithUInt32Data
Surface::create
is replaced withSurface.fromGLFW
supporting the hxglfw library
Samples are available at https://github.com/ibilon/hxwgpu-samples/.
This library is MIT licensed, wgpu-native is MPL-2.0 licensed and has several dependencies.