Skip to content

Older Installation Instructions for all OS

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

OSX

============================================================ Tested with El Capitan, Yosemite and Xcode 8, 7 and 6.

Step 1

install Xcode 8 command line tools from terminal : xcode-select --install

Step 2 (SDL2)

A. Download from Development Libraries -> Mac OS X -> SDL2-2.0.x.dmg
https://www.libsdl.org/download-2.0.php#source

B. Open the .dmg file , press command+shift+g navigate to /Library/Frameworks and copy the SDL2.framework file .

C. Open up a terminal and navigate to : /Library/Frameworks/SDL2.framework then sign the framework using the command: "codesign -f -s - SDL2"

Step 3 (SDL2_mixer)

A. Download from Development Libraries -> Mac OS X -> SDL2_mixer-2.0.x.dmg https://www.libsdl.org/projects/SDL_mixer/

B. C. Same as above!

TIP: Sign the SDL2_mixer framework with the command: "codesign -f -s - SDL2_mixer"

Step 3 (read below only if the provided, precompiled boost library do not work for you)

Install macports (download it from : https://www.macports.org/)

then open up a terminal and type: sudo port install boost

Step 4

You can build the project files with CMake or CMake GUI

Build project files with CMake.

Open a terminal and navigate to glGA then type: mkdir build cd build cmake .. -G Xcode CMake will generate in "build" directory a glGAframework.xcworkspace which is ready for use.

Build project files with CMake GUI

Tested with version 2.8.12.1 and 3.3.2. Open CMake GUI Add to "where is the source code:" the path to glGA Add to "Where to build the binaries:" the path to build the glGA (glGA-5.0/build) Configure (Specify the generator for this project:Xcode, Select "Use default native compilers" -> Done) Generate

CMake GUI will generate in "build" directory a glGAframework.xcworkspace which is ready for use.

Step 5

A. Product-> Scheme-> e.g. Basic Cube and similarly for all schemes:

B. At the "Arguments" tab:

In Section "Environment Variables":

Name: DYLD_LIBRARY_PATH

Value: $(SOURCE_ROOT)/_thirdPartyLibs/lib/OSX

C.In Build settings of glGA: C++ language dialect: C++11[-std=c++11] C++ standard library: libc++ (LLVM C++ standard library with C++11 support)

Step 6

If any of your projects can't find the needed models, 'At the "Options" tab:

Enable the 'Working directory' and add in the field the location of your models. For example for basicCubeGUI add the following:

$(SOURCE_ROOT)/examples/basicCubeGUI

Step 7 (Precomputed Radiance Transfer Support)

For building glGA with PRT support: Build Setings->Preprocessor Macros add USE_PRT=1

Step 8 (Animation Interpolation)

Select Animation Interpolation in glGAMath.h by setting the INTERPOLATION. You can select one of the following:

// #define QUAT 0

// #define DQUAT 1

// #define GA_GAIGEN 2

// #define CGA_GAIGEN 3

// #define GA_VERSOR 4

// #define CGA_VERSOR 5

// #define GA_GAALOP 6

// #define CGA_GAALOP 7

For example for quaternions use the following:

// #define INTERPOLATION QUAT

If you are using GA_VERSOR or CGA_VERSOR:

A. Change the build settings of glGAMath:

C++ language dialect: C++11[-std=c++11] C++ standard library: libc++ (LLVM C++ standard library with C++11 support)

B. Add to the Header Search Paths in the build settings of glGAMath and glGA the following:

$(SOURCE_ROOT)/_thirdPartyLibs/include/gfx $(SOURCE_ROOT)/_thirdPartyLibs/include/vsr

C.Change the build settings of the project that runs with GA_VERSOR or CGA_VERSOR support:

  1. C++ language dialect: C++11[-std=c++11]

  2. C++ standard library: libc++ (LLVM C++ standard library with C++11 support)

  3. Add the following to the OtherLinkerFlags:

$(SOURCE_ROOT)/_thirdPartyLibs/lib/OSX/libvsr.a $(SOURCE_ROOT)/_thirdPartyLibs/lib/OSX/libgfx.a $(SOURCE_ROOT)/_thirdPartyLibs/lib/OSX/libGLV.a

  1. Add to the Header Search Paths:

$(SOURCE_ROOT)/_thirdPartyLibs/include/gfx $(SOURCE_ROOT)/_thirdPartyLibs/include/vsr

When changing animation interpolation method first build glGAMath and then glGA library.

Windows

============================================================ Running on Visual Studio 2015

Step 1

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: GLGA = C:\Users\MK\Desktop\glGA PATH = %PATH%;%GLGA%_thirdPartyLibs\lib\Windows;

Step 2

Build with CMake GUI Tested with version 3.7.2. Open CMake GUI Add to "where is the source code:" the path to glGA Add to "Where to build the binaries:" the path to build the glGA (glGA-5.0/build) Configure (Specify the generator for this project:Visual Studio 14 2015, Select "Use default native compilers" -> Done) Generate

Build with CMake

Open cmd and navigate to glGA-5.0 then type: mkdir build cd build cmake ../ -G "Visual Studio 14 2015"

Open the solution glGAframework.sln in directory glGA-5.0/build

Step3 (Build Assimp in Windows (if you need it otherwise it is included in the framework))

Download and install Cmake (we are going to use cmake-gui): http://www.cmake.org/cmake/resources/software.html Download and install DirectX sdk (http://www.microsoft.com/en-us/download/confirmation.aspx?id=6812) . Check the environment variable DXSDK_DIR for Direct SDK (assimp needs this in windows).

Download assimp-master: https://github.com/assimp/assimp (uparhei epilogi dexia stin othoni Download Zip) Unzip the zip in any directory of your choise. Lets say i have downloaded assimp in G:\Libraries\ directory and also i have unzipped it there. So there is the following folder: G:\Libraries\assimp-master Run Cmake Gui Set "Where is the source code" with G:/Libraries/assimp-master/ Set "Where to build the binaries" with G:/Libraries/assimp-master/cmake_build -> This is the directory where the project files will be created. Click Configure in Cmake-Gui and choose Visual Studio 10 Set Cmake Install Prefix: G:/Libraries/assimp-master/cmake_build Also enable ASSIMP_BUILD_STATIC_LIB Click Generate and go to directory: G:/Libraries/assimp-master/cmake_build Run Assimp.sln You can see the Projects on the left. Build ALL_BUILD project in Release Mode. Build INSTALL project so the libs + headers will be copied to installation directory.

You are going to need the following files and folders:

  1. G:\Libraries\assimp-master\cmake_build\lib\assimp.lib
  2. G:\Libraries\assimp-master\cmake_build\contrib\zlib\Release\zlibstatic.lib
  3. G:\Libraries\assimp-master\cmake_build\include\

Step 4 (Precomputed Radiance Transfer)

For building glGA with PRT support: In Solution exproler go to glGA properties then Configuration Properties->C/C++->Preprocessor. In Preprocessor Definitions at ;USE_PRT=1

Step 5 (Animation Interpolation)

Select Animation Interpolation in glGAMath.h by setting the INTERPOLATION. You can select one of the following:

// #define QUAT 0

// #define DQUAT 1

// #define GA_GAIGEN 2

// #define CGA_GAIGEN 3

// #define GA_GAALOP 6

// #define CGA_GAALOP 7

For example for quaternions use the following:

// #define INTERPOLATION QUAT

For Windows GA_VERSOR and CGA_VERSOR are currently not supported!

When changing animation interpolation method first build glGAMath and then glGA library.

Linux

============================================================== 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.

-Good luck!