Skip to content

Basic Linux Installation Instructions

Manos Kamarianakis edited this page Dec 14, 2020 · 1 revision

Step 1

Open up a terminal (ctrl + alt + t).

  • sudo apt-get update
  • sudo apt-get install build-essential
  • sudo apt-get install xorg-dev
  • sudo apt-get install libglu1-mesa-dev
  • sudo apt-get install ImageMagick
  • sudo apt-get install libmagick++-dev
  • sudo apt-get install boost
  • sudo apt-get install xutils-dev
  • sudo apt-get install mesa-utils
  • sudo apt-get install libsdl2-dev
  • sudo apt-get install libsdl2-mixer-dev

Step 2

Create a new enviroment variable named GLGA and set it to the path where glGA is located. then update the PATH enviroment variable with the path where glGA third party libraries are located. example (terminal):

  • nano ~/.profile
  • export GLGA= yourPath/glGAframework
  • export PATH=$PATH:$GLGA/_thirdPartyLibs/lib/Linux/

Step 3

In Ubuntu you can also cmake with the following commands:

  • sudo apt-get update
  • sudo apt-get install cmake

Build Makefiles with CMake. open up a terminal and navigate to glGA/_projects/Linux then type: cmake ../.. -G "Unix Makefiles"

CMake will generate Makefiles which are ready for use. If you hit make under the Linux directory it will build all targets.

But if you want to build a specific target you can navigate for example to assignments and hit make which will build all assignments from 1-8 or navigate to Assignments1 folder and hit make which will build just Assignment1.

make clean removes all executables.

Notes

  1. All executables are build into the folders where the source files are located. e.g. Assignment1.exe is inside glGA/assignments/Assignment1/
  2. Depending on your GPU and how powerfull it is, you may need to change multisampling in order to function properly. In every "main".cpp file there is an initSDL() function. you may need to comment those 2 lines or change the value of MULTISAMPLESAMPLES to 8/4/2 etc: SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 16);
  3. Above note has use to all SDL_GL_SetAttribute calls!!! Change them if something seems to not work properly. You can also comment them in order to get the default values.

Step 4

Installation of Image Magick (if you need it otherwise it is included in the framework):

Download from Ubuntu Software Center and use -lMagick++ in Makefiles. It is installed in usr/lib and usr/include/ImageMagick.