source: opengl-game/README.txt@ e1a7f5a

feature/imgui-sdl points-test
Last change on this file since e1a7f5a was e1a7f5a, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 5 years ago

Copy an SDL Texture to a Vulkan texture to use as a UI overlay on the 3D scene

  • Property mode set to 100644
File size: 3.5 KB
Line 
1Installation Instructions for Linux
2---------------------------------------
3
4sudo apt-get install xorg-dev libglew-dev libglm-dev
5
6make newgame && ./newgame
7
8(Old Linux instructions for compiling game.cpp)
9-sudo apt-get install cmake xorg-dev libglew-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
10
11-Compile GLFW3 from source
12 (cmake . && make && sudo make install)
13
14Installation Instructions for OSX
15---------------------------------------
16
17brew install glew
18brew install glfw --without-shared-library
19brew install glm
20
21This should place all necessary files (or possibly symlinks to them) in
22/usr/loca/include and /usr/local/lib.
23
24Run 'xcode-select --install'
25This should make g++ check for libraries in /usr/local/
26
27If 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
30make newgame && ./newgame
31
32Installation Instructions for Windows
33---------------------------------------
34
35Download the precompiled 32bit binaries of GLFW and GLEW. Create lib/ and
36include/ folders in the root opengl-game directory you cloned.
37Copy the include/GL/ and include/GLFW/ folders into your include/ folder.
38
39For GLEW, copy lib/RELEASE/Win32/glew32s.lib into your lib folder.
40For GLFW, copy lib-vc2015/glfw3.lib into your lib folder.
41
42Download GLM and copy the glm folder (the one with all the .hpp files) into the include/ folder you made above.
43GLM is a header-only library, so there is nothing to copy into the lib/ folder.
44
45Open and run NewOpenGLGame.sln in Visual Studio 2017 and run it.
46
47
48--------------------
49VULKAN INSTRUCTIOS
50--------------------
51
52Windows
53--------
54
55Create an include directory inside the opengl-game folder
56
57Download GLM and copy the glm folder into /include
58
59Download the SDL2 pre-built Windows binaries
60 - Copy the SDL2 include folder into /include and rename it SDL2
61 - Copy the contents of lib/x64 to lib
62
63Download the SDL_image Visual C++ development libraries from https://www.libsdl.org/projects/SDL_image/
64
65Download the SDL_ttf Visual C++ development libraries from https://www.libsdl.org/projects/SDL_ttf/
66
67TODO: Figure out how to do static compilation with SDL2
68
69Download 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
72
73Linux:
74--------
75
76Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
77
78sudo apt-get install libxcb1-dev xorg-dev libsdl2-dev libglm-dev
79
80source setup-env.sh into your current shell
81
82make vulkangame && ./vulkangame
83
84OSX
85--------
86
87Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
88
89brew install sdl2
90brew install sdl2_image
91brew install sdl2_ttf
92
93make vulkangame && ./vulkangame
94
95REFERENCE
96----------
97
98UV coords 0 u 1 x, y, z -1 (untransformed z ranges from 0 to 1, glm::perspective seems to make the z range negative)
99 0 -------> ^
100 | |
101 v | -1 | 0 1
102 | <-----|----->
103 1 V /|
104 / |
105 1 v
106 1
107
108DEPLOYMENT
109-----------
110
111The deploy folder has an old Inno Setup script for deploying the game on Windows.
112
113I should check out IzPack. Seems to be a cross-platform solution.
Note: See TracBrowser for help on using the repository browser.