To install CMake:
sudo apt-get install cmake
sudo apt-get install libxcursor-dev \
libgles2-mesa-dev \
zlib1g-dev \
libfontconfig1-dev \
libmpg123-dev \
libsndfile1 \
libsndfile1-dev \
libpulse-dev \
libasound2-dev \
libcurl4-gnutls-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-libav \
gstreamer1.0-alsa \
gstreamer1.0-pulseaudio \
gstreamer1.0-plugins-bad
git clone --recursive https://github.com/cinder/Cinder.git
cd Cinder
mkdir build && cd build
cmake .. -DCINDER_TARGET_GL=es2-rpi
make -j 3
NOTE: Attempting to build Cinder with more than 3 jobs (specified with the -j 3
parameter) will likely cause a hard crash due to GCC memory requirements.
Cinder can also be used with the version of Clang (v3.5.0) packaged for Raspbian Jessie. Install it using apt-get
:
sudo apt-get install clang
To set Clang as the default compiler, select /usr/bin/clang++
when prompted by this command:
sudo update-alternatives --config c++
cd samples/BasicApp/proj/cmake
mkdir build && cd build
cmake .. -DCINDER_TARGET_GL=es2-rpi
make
Starting from samples/BasicApp/proj/cmake/build
:
./Debug/BasicApp
Hit the Esc
key to exit the BasicApp. Cinder for Linux on the Raspberry Pi 3 currently has Esc
hardcoded to exit an application. Otherwise it's non-trivial to return to the OS. A future version will offer a more graceful way to handle this.
Raspbian ships with Pulse Audio installed, however you must start the pulsedeamon
before you can use audio in your application. Do that by running the following:
pulseaudio -D
Try the following, it will force output to the 3.5mm jack (more information here):
sudo amixer cset numid=3 1