Skip to content

Conversation

Sangrail
Copy link

  • Added game of life example that runs on SDL3 with WebGPU (this example is a port of the javascript tutorial you can find here. We use compute shaders to handle the CA logic.
  • Uses platform-specific OS handling for both JavaScript (web) and SDL3 (native), just like the SDL3 Triangle example.
  • Created build scripts for compiling to WebAssembly for web deployment, just like the SDL3 Triangle example.
  • Added HTML template for web application to load the WebAssembly module and JavaScript bindings, just like the SDL3 Triangle example.
  • Included necessary shader code for rendering a simple triangle, to render the grid onto.
  • Ensured proper memory management and surface configuration for both environments.
  • Renamed and moved the triangle rendering example using SDL3 and WebGPU (as we now have two SDL3 examples).

This is my first real work with Odin.

Checklist before submitting:

  • [x ] This example has been added to .github/workflows/check.yml (for automatic testing)
  • [x ] This example compiles cleanly with flags -vet -strict-style -vet-tabs -disallow-do -warnings-as-errors
  • [x ] This example the naming and style convention: https://github.com/odin-lang/examples/wiki/Naming-and-style-convention (exceptions can be made for ports of examples that need to match 1:1 to the original source).
  • [x ] By submitting, I understand that this example is made available under these licenses: Public Domain and Odin's BSD-3 license. Only for third-party dependencies are other licenses allowed.

- Renamed and moved the triangle rendering example using SDL3 and WebGPU.
- Added game of life example with platform-specific OS handling for both JavaScript (web) and SDL3 (native).
- Created build scripts for compiling to WebAssembly for web deployment.
- Added HTML template for web application to load the WebAssembly module and JavaScript bindings.
- Included necessary shader code for rendering a simple triangle.
- Ensured proper memory management and surface configuration for both environments.
@Sangrail Sangrail changed the title Add WebGPU triangle example with SDL3 and WebAssembly support Add WebGPU Game of Life example with SDL3 and WebAssembly support Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant