freeglut 3.2.1
PDF - Computer Graphics with Open GL
environment setup ubuntu 16.04LTS
sudo apt-get install cmake
# cmake version 3.5.1
gcc --version
# 5.4.0
## install OpenGL libraires
sudo apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev
sudo apt-get install mesa-utils
sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev
# Method 1: install GLUT
tar -xf freeglut-3.2.1.tar.gz -C .
cd freeglut-3.2.1
mkdir build
cd build
cmake ..
cd ..
make
sudo make install
# Method 2: verify if system has glut
sudo apt-cache search glut
# get GLUT header files for development
sudo apt-get install freeglut3-dev
# confirm GL files
dpkg -L freeglut3-dev
# verify GLUT has been installed correctly
glxgears
# if ok, a spinning gears animation will popup
How to build freeglut on UNIX
- Make sure you have cmake installed. Examples:
- Debian/Ubuntu: apt-get install cmake
- Fedora: yum install cmake
- FreeBSD: cd /usr/ports/devel/cmake && make install Or directly from their website: http://www.cmake.org/cmake/resources/software.html
- Make sure you have the basics for compiling code, such as C compiler (e.g., GCC) and the make package.
- Also make sure you have packages installed that provide the relevant
header files for opengl (e.g., libgl1-mesa-dev on Debian/Ubuntu) and
the chosen backend :
- X11: x11 (e.g., libx11-dev, libxrandr-devel on Debian/Ubuntu) and XInput (libxi-dev / libXi-devel)
- Wayland: wayland (e.g., libwayland-dev and libegl1-mesa-dev on Debian/Ubuntu) and xkbcommon (libxkbcommon-dev /libxkbcommon-devel)
- Run ‘cmake .’ (or ‘cmake . -DFREEGLUT_WAYLAND=ON’ for Wayland) in the freeglut directory to generate the makefile.
- Run ‘make’ to build, and ‘make install’ to install freeglut.
- If you wish to change any build options run ‘ccmake .’