https://github.com/alaingalvan/opengl-seed-wasm
🌐⚪ An example of of the opengl-seed example compiled to WebAssembly.
https://github.com/alaingalvan/opengl-seed-wasm
Last synced: about 1 month ago
JSON representation
🌐⚪ An example of of the opengl-seed example compiled to WebAssembly.
- Host: GitHub
- URL: https://github.com/alaingalvan/opengl-seed-wasm
- Owner: alaingalvan
- Created: 2020-01-25T15:52:00.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T15:57:09.000Z (over 2 years ago)
- Last Synced: 2025-01-23T22:34:27.625Z (3 months ago)
- Language: HTML
- Homepage: https://glitch.com/~opengl-seed-wasm
- Size: 192 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README

# ⚪ OpenGL Seed WebAssembly
[![CMake][cmake-img]][cmake-url]
[![License][license-img]][license-url]- [🐟 Glitch Example](https://glitch.com/~opengl-seed-wasm)
- [💬 Blog Post](https://alain.xyz/blog/raw-opengl)
An example build of the [OpenGL Seed](https://github.com/alaingalvan/opengl-seed) built for WebAssembly.
## Setup
First install:
- [Git](https://git-scm.com/)
- [CMake](https://cmake.org)
- A Text Editor such as [Visual Studio Code](https://code.visualstudio.com/).
- [Emscripten SDK](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html), make sure to add it's Emscripten installation to your `PATH`.
Then type the following in any terminal your such as [VS Code's Integrated Terminal](https://code.visualstudio.com/docs/editor/integrated-terminal).
> **Note**: if you're on Windows, I would highly recommend using the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10#install-the-windows-subsystem-for-linux).
```bash
# 🐑 Clone the repo
git clone https://github.com/alaingalvan/opengl-seed --recurse-submodules# 💿 go inside the folder
cd opengl-seed# 👯 If you forget to `recurse-submodules` you can always run:
git submodule update --init# ⚠️ Possible dependencies you might need:
sudo apt-get update
sudo apt-get install cmake build-essential llvm# 👷 Make a build folder
mkdir wasm
cd wasm# 🔨 Build the project
emcmake cmake ..
emmake make OpenGLSeed -j
```From there create an HTML file that loads the generated `OpenGLSeed.js` file, and run an http server.
[cmake-img]: https://img.shields.io/badge/cmake-3.6-1f9948.svg?style=flat-square
[cmake-url]: https://cmake.org/
[license-img]: http://img.shields.io/:license-unlicense-blue.svg?style=flat-square
[license-url]: http://unlicense.org/