Skip to content

software-mansion/byegl

Repository files navigation

byegl (light mode) byegl (dark mode)

Migrate from WebGL to WebGPU, incrementally

Documentation

Intro

Pronounced like "bagel" or "beagle", but with a "bye"

This project aims to reimplement the WebGL API on top of WebGPU, which will allow established WebGL-based projects to gradually migrate to the WebGPU over time (or in other words, to "de-WebGL their codebase")

Getting Started

All you need to migrate your WebGL code to WebGPU is the following:

import * as byegl from 'byegl';

// Enable and await...
await byegl.enable();

// Intercepted by byegl 🥯🐶
const gl = canvas.getContext('webgl');

Enabling byegl will intercept calls to .getContext('webgl' | 'webgl2' | 'experimental-webgl') on all canvases and return a virtualized WebGL context.

For more information, see the documentation.

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting a pull request.

Licence

This project is licensed under the MIT License.

About

🥯🐶 A reimplementation of the WebGL API on top of WebGPU, allowing for gradual migration into the future of 3d on the web

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors