Skip to content
This repository has been archived by the owner on Mar 12, 2022. It is now read-only.

ibilon/hxwgpu

Repository files navigation

(WIP) hxwgpu

Build Status

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

Building

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.

Usage

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 with new Adapter
  • AdapterInfo is not available
  • device.createBufferWithData is replaced with device.createBufferWithFloat32Data, device.createBufferWithUInt16Data and device.createBufferWithUInt32Data
  • Surface::create is replaced with Surface.fromGLFW supporting the hxglfw library

Samples are available at https://github.com/ibilon/hxwgpu-samples/.

License

This library is MIT licensed, wgpu-native is MPL-2.0 licensed and has several dependencies.

About

hxwgpu is a work in progress haxe/hxcpp wrapper around wgpu-native, allowing the use of the WebGPU API on desktop

Topics

Resources

License

Stars

Watchers

Forks