Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 1.82 KB

README.md

File metadata and controls

68 lines (49 loc) · 1.82 KB

WebAssembly/WebGL and Native/OpenGL 3D project StarterKit

A starting point for a new web and native cross-platform 3D project.

Builds with CMake. Supports GLFW.

Details

  • Requires Make and CMake installed.
  • CMake configures Make to build for both environments.
  • The Makefile in the root is only a task runner.
  • Libraries available in emscripten.
  • Displays an empty off-white window. Nothing else.

Building

WebAssembly

Native Linux

Tested on Ubuntu 16.04.

  • Install development tools X11 and OpenGL: sudo apt install xorg-dev libgl1-mesa-dev
  • Install GLFW: http://www.glfw.org/download.html
    • wget https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.zip
    • unzip glfw-3.2.1.zip
    • cd glfw-3.2.1
    • cmake .
    • sudo make install
  • Build/Run the example
    • cd starter-wasm-webgl-opengl
    • make native

Notes

I was hoping to build both in the same CMake tree, but the CMAKE_TOOLCHAIN_FILE change for emscripten breaks the native build.

Thanks to:

Todo

  • Test/debug on a fresh Ubuntu install
  • Native MacOS
  • Native Windows
  • More polish