[cfda3b2] | 1 | Installation Instructions for Linux
|
---|
| 2 | ---------------------------------------
|
---|
| 3 |
|
---|
[fe70cd3] | 4 | sudo apt-get install xorg-dev libglew-dev libglm-dev
|
---|
[cfda3b2] | 5 |
|
---|
[885f0bb] | 6 | make newgame && ./newgame
|
---|
[669c4e6] | 7 |
|
---|
[885f0bb] | 8 | (Old Linux instructions for compiling game.cpp)
|
---|
[fe70cd3] | 9 | -sudo apt-get install cmake xorg-dev libglew-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
|
---|
[03f4c64] | 10 |
|
---|
| 11 | -Compile GLFW3 from source
|
---|
| 12 | (cmake . && make && sudo make install)
|
---|
[cfda3b2] | 13 |
|
---|
[5a643d3] | 14 | Installation Instructions for OSX
|
---|
| 15 | ---------------------------------------
|
---|
| 16 |
|
---|
[fc424f6] | 17 | brew install glew
|
---|
[e6bc0f4] | 18 | brew install glfw --without-shared-library
|
---|
[fc424f6] | 19 | brew install glm
|
---|
| 20 |
|
---|
| 21 | This should place all necessary files (or possibly symlinks to them) in
|
---|
| 22 | /usr/loca/include and /usr/local/lib.
|
---|
[4d52702] | 23 |
|
---|
[5a643d3] | 24 | Run 'xcode-select --install'
|
---|
| 25 | This should make g++ check for libraries in /usr/local/
|
---|
| 26 |
|
---|
[58088c0] | 27 | If the above command gives you the following error, you should be able to move on and compile the game.
|
---|
| 28 | "xcode-select: error: command line tools are already installed, use "Software Update" to install updates"
|
---|
| 29 |
|
---|
[885f0bb] | 30 | make newgame && ./newgame
|
---|
| 31 |
|
---|
[cfda3b2] | 32 | Installation Instructions for Windows
|
---|
| 33 | ---------------------------------------
|
---|
[4d52702] | 34 |
|
---|
[21de283] | 35 | Download the precompiled 32bit binaries of GLFW and GLEW. Create lib/ and
|
---|
[dba67b2] | 36 | include/ folders in the root opengl-game directory you cloned.
|
---|
| 37 | Copy the include/GL/ and include/GLFW/ folders into your include/ folder.
|
---|
[21de283] | 38 |
|
---|
[dba67b2] | 39 | For GLEW, copy lib/RELEASE/Win32/glew32s.lib into your lib folder.
|
---|
| 40 | For GLFW, copy lib-vc2015/glfw3.lib into your lib folder.
|
---|
| 41 |
|
---|
| 42 | Download GLM and copy the glm folder (the one with all the .hpp files) into the include/ folder you made above.
|
---|
| 43 | GLM is a header-only library, so there is nothing to copy into the lib/ folder.
|
---|
| 44 |
|
---|
[58088c0] | 45 | Open and run NewOpenGLGame.sln in Visual Studio 2017 and run it.
|
---|
[03f4c64] | 46 |
|
---|
| 47 |
|
---|
| 48 | --------------------
|
---|
[ab65f84] | 49 | VULKAN INSTRUCTIOS
|
---|
| 50 | --------------------
|
---|
| 51 |
|
---|
| 52 | Windows
|
---|
| 53 | --------
|
---|
| 54 |
|
---|
[1c6cd5e] | 55 | Create an include directory inside the opengl-game folder
|
---|
| 56 |
|
---|
| 57 | Download GLM and copy the glm folder into /include
|
---|
[5f3dba8] | 58 |
|
---|
[1c6cd5e] | 59 | Download the SDL2 pre-built Windows binaries
|
---|
| 60 | - Copy the SDL2 include folder into /include and rename it SDL2
|
---|
[5f3dba8] | 61 | - Copy the contents of lib/x64 to lib
|
---|
| 62 |
|
---|
| 63 | Download the SDL_image Visual C++ development libraries from https://www.libsdl.org/projects/SDL_image/
|
---|
| 64 |
|
---|
| 65 | Download the SDL_ttf Visual C++ development libraries from https://www.libsdl.org/projects/SDL_ttf/
|
---|
| 66 |
|
---|
| 67 | TODO: Figure out how to do static compilation with SDL2
|
---|
[1c6cd5e] | 68 |
|
---|
| 69 | Download the vulkan sdk
|
---|
| 70 | - Add the location of the Include folder to the VS2019 project properties under C/C++ -> General -> Addition Include DIrectories
|
---|
| 71 | - Add the location of the Lib folder to the VS2019 project properties under Linker -> General -> Addition Library DIrectories
|
---|
[03f4c64] | 72 |
|
---|
| 73 | Linux:
|
---|
[ab65f84] | 74 | --------
|
---|
[03f4c64] | 75 |
|
---|
[ab65f84] | 76 | Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
|
---|
[03f4c64] | 77 |
|
---|
[1c6cd5e] | 78 | sudo apt-get install libxcb1-dev xorg-dev libsdl2-dev libglm-dev
|
---|
| 79 |
|
---|
[b6127d2] | 80 | source setup-env.sh into your current shell
|
---|
| 81 |
|
---|
[1c6cd5e] | 82 | make vulkangame && ./vulkangame
|
---|
[f898c5f] | 83 |
|
---|
| 84 | OSX
|
---|
[ab65f84] | 85 | --------
|
---|
| 86 |
|
---|
| 87 | Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
|
---|
[f898c5f] | 88 |
|
---|
[c8c6da8] | 89 | brew install sdl2 sdl2_image sdl2_ttf
|
---|
[1c6cd5e] | 90 |
|
---|
| 91 | make vulkangame && ./vulkangame
|
---|
[fba08f2] | 92 |
|
---|
| 93 | REFERENCE
|
---|
| 94 | ----------
|
---|
| 95 |
|
---|
| 96 | 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)
|
---|
| 97 | 0 -------> ^
|
---|
| 98 | | |
|
---|
| 99 | v | -1 | 0 1
|
---|
| 100 | | <-----|----->
|
---|
| 101 | 1 V /|
|
---|
| 102 | / |
|
---|
| 103 | 1 v
|
---|
[5f3dba8] | 104 | 1
|
---|
[e1a7f5a] | 105 |
|
---|
| 106 | DEPLOYMENT
|
---|
| 107 | -----------
|
---|
| 108 |
|
---|
| 109 | The deploy folder has an old Inno Setup script for deploying the game on Windows.
|
---|
| 110 |
|
---|
| 111 | I should check out IzPack. Seems to be a cross-platform solution.
|
---|