This is a work in progress which purpose is for me to learn C++.
Todo:
- make entities learn to look for food
- make entities move randomly and die after some time
- continus formated statistics
- terrain height
- controled camera
- normal mapping
- physically based shading
- gamma correction
- deferred shading
- robust shadow volume
- batched rendering
- ambiant, diffuse, specular lighting
- png textures
- obj, mtl parser
- vertex array object
- basic entity component system
Type make
and the application should configure, compile and run \o/.
Optionaly, you can run:
make configure
- generate the projectmake compile
- compile the applicationmake test
- compile and run the testsmake run
- run the applicationmake tidy
- run cland tidy static analyzermake check
- run cppcheck static analyzer
brew update
brew tap homebrew/versions
brew install glfw3 glm ninja
pip install buildfox
Prerequisits:
apt-get update
apt-get install curl unzip python-pip cmake
Libs:
apt-get install libc++-dev libglew-dev
Build system:
apt-get install ninja-build
pip install buildfox
GLM:
curl -LO http://downloads.sourceforge.net/project/ogl-math/glm-0.9.6.3/glm-0.9.6.3.zip
unzip -q glm-0.9.6.3.zip
sudo cp -r glm/glm /usr/include/
rm -rf glm glm-0.9.6.3.zip
GLFW3:
curl -LO https://github.com/glfw/glfw/releases/download/3.1.1/glfw-3.1.1.zip
unzip -q glfw-3.1.1.zip
cd glfw-3.1.1
cmake .
make
sudo make install
cd ..
rm glfw-3.1.1.zip
To install CPPCheck:
git clone git clone git://github.com/danmar/cppcheck.git
cd cppcheck
cmake .
make && make install
To install Clang Static Analyzer, llvm-cov, clang-tidy:
brew install lcov
brew install llvm --with-clang
export PATH="$PATH:/usr/local/opt/llvm/bin/"
or:
apt-get install llvm lcov
You need to install rlk's envtools, util3d, and sht.
git clone git@github.com:rlk/util3d.git
git clone git@github.com:rlk/sht.git
git clone git@github.com:rlk/envtools.git
cd sht && make && cd ..
cd envtools && make && cd ..
sudo cp sht/shtrans /usr/lib/
sudo cp envtools/envremap /usr/lib/
You also need to install ImageMagick. If you'are on mac you can type brew install imagemagick
.
Then simply place your cubemap's png images in the resource's environement folder (named front.png, back.png, left.png, right.png, top.png, bottom.png) and run ./scripts/cubemap2irrmap.sh -i lib/res/textures/environments/stormyday
.