5 MandelWow is a generalized version of Mandelbrot & Julia in which both C and Z0 vary in a 4-dimensional space.
6 On each frame we render a 3D slice of the MandelWow, varying the remaining dimension through time.
8 I wrote this demo to learn Rust & basic GLSL. Mind the mess.
13 The native binary requires OpenGL 3.1. Should perform well on reasonably modern
14 hardware. Tested on Linux with Intel HD Graphics 4000 (Ivy Bridge) and NVidia GTX 970.
16 The asmjs and WebAssembly versions were tested on Chromium 57 and Firefox 53.
19 ## Building from source
23 Install cargo (either your distro's packaged version or via rustup), then go to the source root and type:
31 Mandelwow depends on [libxm](https://github.com/nukep/libxm-rs) and [SDL2](https://github.com/AngryLawyer/rust-sdl2) for sound.
32 Both are tricky to build using Rust's MSVC toolchain because they assume GCC, so I recommend using the GNU toolchain instead.
33 I followed these steps to build a native Windows binary:
35 * Install Cargo via [rustup](https://www.rustup.rs).
36 * Install mingw-w64. The [MSYS2](http://www.msys2.org/) installer provides the basic shell environment and the package manager.
37 * From the MSYS2 console, install the W64 native toolchain and libSDL2:
40 pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2
42 * While you're at it, you may also want to install the git package: `pacman -S git`
43 * I had to manually add the mingw-w64 toolchain to your path:
45 export PATH="/mingw64/bin:$PATH"
46 export LIBRARY_PATH=/mingw64/lib
48 * In case `cargo` and `rustup` aren't in the shell path, add `$USERPROFILE/.cargo/bin` too.
49 * Next, install the Rust toolchain targeting GCC:
51 rustup toolchain install stable-x86_64-pc-windows-gnu
52 rustup default stable-x86_64-pc-windows-gnu
54 * Now you can proceed to mandelwow's source tree and build a native Windows binary without further hassles:
59 ### WebAssembly / asm.js
61 Install emsdk 1.36.14:
65 curl -O https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
66 tar xf emsdk-portable.tar.gz
67 source emsdk-portable/emsdk_env.sh
68 emsdk install emscripten-1.37.9 --build=MinSizeRel
69 emsdk activate emscripten-1.37.9 --build=MinSizeRel
76 curl https://sh.rustup.rs -sSf | sh
78 rustup toolchain install nightly
79 rustup default nightly
80 rustup target install asmjs-unknown-emscripten
81 rustup target install wasm32-unknown-emscripten
84 Build and run mandelwow:
91 Build the WebAssembly binary:
100 This project is GPL 3.0.
101 The support/ directory contains some code forked from Glium, which was originally Apache 2.0.