Skip to content

Cross-Platform WebAssembly/WebGL and Native/OpenGL 3D GLFW project StarterKit built with CMake

License

Notifications You must be signed in to change notification settings

13rac1/starter-wasm-webgl-opengl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Cross-Platform WebAssembly/WebGL and Native/OpenGL 3D GLFW project StarterKit built with CMake

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published