===========
Compilation
===========

Linux
=====
Prerequisites:
--------------
Softwares: g++ (version 8+), cmake
Libraries: glfw, glew, 
  install command: apt instal libglfw3-dev libglew-dev

Building:
---------
  mkdir build_demo (outside of the sources)
  cmake -S path_to_demo_sources -B build_demo -DCMAKE_BUILD_TYPE=Release
  cd build_demo
  make

If it fails to compile due to std::filesystem, you can try it with a more recent version of g++,
or uncomment the library stdc++fs in CMakeLists.txt as well as change lines 10 and 210 in tilingandblendingdemo.cpp.

Windows
=======
Prerequisites:
--------------
Softwares: Git, CMake, VisualStudio C++
Libraries: freeglut, glew (use vcpkg package system)
  installation of vcpkg:
    Open a cmd shell
    go to c:\ (or where you want, but short path is better)
    git clone https://github.com/Microsoft/vcpkg.git
    cd .\vcpkg\
    .\bootstrap-vcpkg.bat
    .\vcpkg.exe install glfw3:x64-windows
    .\vcpkg.exe install glew:x64-windows
 
Building:
---------
Launch CMake GUI 
  put source dir name and a build dir name (outside of the sources)
  configure
  leave you default Visual compiler and click on "specify tool chanie file for cross compiling"
  On specify Toolchain file: C:/vcpkg/scripts/buildsystems/vcpkg.cmake (replace C:/ with your path)
  generate
  openProject (that launch visual studio)
  choose release configuration
  build and run (or just ctrl F5)


Mac (tested on intel only)
=====
Prerequisites:
--------------
Softwares: clang++ (install via xcode) cmake 
Libraries: glfw, glew (use Homebrew package system https://brew.sh/index_fr)
  install package command: brew install glfw3 glew

Building:
---------
  mkdir build_demo (outside of the sources)
  cmake -S path_to_demo_sources -B build_demo -DCMAKE_BUILD_TYPE=Release
  cd build_demo
  make


=======
Running
=======

Controls 
F1: display repeated input
F2: display ACf-preserving tiling and blending
F3: display ACf-preserving primal and dual blending
F4: display classically-sampled tiling and blending
F5: display classically-sampled primal and dual blending
F10: reset pos and scale (use mouse)
BACKSPACE: swap VBlankSync/FPS Mode
ENTER: load next texture

Use mouse click and drag to move and wheel mouse to zoom

You can launch the program with a texture name of the directory "Textures/" ( no path, no extension)
The ENTER key allow to traverse all texture files of the directory.
