thebookofshaders/appendix/00/README.md

34 lines
1.2 KiB
Markdown
Raw Normal View History

2016-05-09 10:28:02 +00:00
## How can I navigate this book off-line?
Lets say you have a long trip and you want to use it to teach yourself some shaders. In that case you can make a local copy of this book on your computer and run a local server.
For that you only need PHP, Python 2.6 and a git client. On MacOS and Raspberry Pi computers Python is installed by default but you still need to install PHP and a git client. For that:
2016-05-09 10:28:02 +00:00
On **MacOSX** be sure to have [homebrew](http://brew.sh/) installed and then on your terminal do:
2016-05-09 10:28:02 +00:00
```bash
brew update
brew upgrade
brew install git php
2016-05-09 10:28:02 +00:00
```
On **Raspberry Pi** you need to get [Raspbian](https://www.raspberrypi.org/downloads/raspbian/), a Debian-based Linux distribution made for Raspberry Pi and then do:
2016-05-09 10:28:02 +00:00
```bash
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git-core glslviewer php
2016-05-09 10:28:02 +00:00
```
Once you have everything installed you just need to do:
```bash
cd ~
git clone --recursive https://github.com/patriciogonzalezvivo/thebookofshaders.git
cd thebookofshaders
git submodule foreach git submodule init && git submodule update
2016-05-09 10:28:02 +00:00
php -S localhost:8000
```
Then open your browser to [`http://localhost:8000/`](http://localhost:8000/)