Installation Instructions for Linux
---------------------------------------

sudo apt-get install xorg-dev  libglew-dev libglm-dev

make newgame && ./newgame

(Old Linux instructions for compiling game.cpp)
-sudo apt-get install cmake xorg-dev  libglew-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev

-Compile GLFW3 from source
 (cmake . && make && sudo make install)

Installation Instructions for OSX
---------------------------------------

brew install glew
brew install glfw --without-shared-library
brew install glm

This should place all necessary files (or possibly symlinks to them) in
/usr/loca/include and /usr/local/lib.

Run 'xcode-select --install'
This should make g++ check for libraries in /usr/local/

If the above command gives you the following error, you should be able to move on and compile the game.
"xcode-select: error: command line tools are already installed, use "Software Update" to install updates"

make newgame && ./newgame

Installation Instructions for Windows
---------------------------------------

Create lib/ and include/ folders in the root opengl-game directory you cloned.

Download the pre-compiled 64bit binaries of GLFW and GLEW.
Copy the include/GL/ and include/GLFW/ folders into your include/ folder.

For GLEW, copy lib/RELEASE/Win64/glew32s.lib into your lib folder.
For GLFW, copy lib-vc2019/glfw3.lib into your lib folder.

Download GLM and copy the glm folder (the one with all the .hpp files) into the include/ folder you made above.
GLM is a header-only library, so there is nothing to copy into the lib/ folder.

Open and run NewOpenGLGame.sln in Visual Studio 2017 and run it.


--------------------
VULKAN INSTRUCTIOS
--------------------

Windows
--------

Create an include directory inside the opengl-game folder

Download GLM and copy the glm folder into your include directory

Download the 64bit pre-compiledbinaries of GLFW3
 - Copy lib-vc2019/glfw3.lib into your lib directory
 - Copy the whole include/GLFW directory into your include directory

Download the SDL2 pre-built Windows binaries
 - Copy the SDL2 include folder into /include and rename it SDL2
 - Copy the contents of lib/x64 to lib

Download the SDL2_image Visual C++ development libraries from https://www.libsdl.org/projects/SDL_image/
Download the SDL2_ttf Visual C++ development libraries from https://www.libsdl.org/projects/SDL_ttf/
(Might use SDL2_gfx later as well)

Copy the 64-bit static libraries to the lib directory you created above

TODO: Figure out how to do static compilation with SDL2

Since I'm currently using dynamic SDL2 libraries for Windows, some DLLs from sdl2-ttf and sdl2-image

Download the vulkan sdk
 - Add the location of the Include folder to the VS2019 project properties under C/C++ -> General -> Addition Include DIrectories
 - Add the location of the Lib folder to the VS2019 project properties under Linker -> General -> Addition Library DIrectories

Linux:
--------

Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)

sudo apt-get install libxcb1-dev xorg-dev libglm-dev libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev

source setup-env.sh into your current shell

make vulkangame && ./vulkangame

OSX
--------

Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)

brew install sdl2 sdl2_image sdl2_ttf sdl2_gfx

make vulkangame && ./vulkangame

REFERENCE
----------

UV coords   0  u  1       x, y, z  -1  (untransformed z ranges from 0 to 1, glm::perspective seems to make the z range negative)
         0  ------->                ^
           |                        |
         v |                  -1    | 0   1
           |                  <-----|----->
         1 V                       /|
                                  / |
                                1   v
                                    1

DEPLOYMENT
-----------

The deploy folder has an old Inno Setup script for deploying the game on Windows.

I should check out IzPack. Seems to be a cross-platform solution.
