/emscripten-test

A small C++ OpenGL that can be compiled to WebAssembly or to a native executable.

Primary LanguageC++

A small example of how to write a single C++ that can run both natively and in a web browser. Using CMake presets it can be compiled using GCC, Clang or MSVC to a native executable or using Emscripten to WebAssembly to run in a web browser. It supports not only bare C++, but also OpenGL, which it can translate to WebGL. The supported OpenGL subset is OpenGL 4.3 as it is compatible with OpenGL ES 3.0 on which WebGL 2.0 is based.

The repository gets automatically built using a Github Action and gets deployed to Github Pages. The built page is available here.