Skip to content

mdhvg/opengl-web

Repository files navigation

Shaders (On the Web)

OpenGL compiled for web using Emscripten 😵‍💫😵

Most of C++ code is taken from my other repository which is purely for desktop

Preview

-I am too tired to fix the aspect ratio

Building Instructions

Requires EMSDK installed and set in system PATH (for all OS's)

  • Recursively clone this repo
git clone --recursive https://github.com/mdhvg/opengl-web
cd opengl-web
  • First do npm install
npm i
  • Create build directory in src-cpp
cd src-cpp
mkdir build

Linux/MacOS (Mac not tested)

  • Build the C++ code
emcmake cmake -S . -B build -DPROGRAMS=noise
cmake --build build -j4

Usage

Once the C++ files are built, change back to project root directory

cd opengl-web

Run like any other vite react project

npm run dev

Releases

No releases published

Packages

No packages published