source: opengl-game/README.txt@ cbe946d

feature/imgui-sdl points-test
Last change on this file since cbe946d was cbe946d, checked in by Dmitry Portnoy <dmp1488@…>, 6 years ago

Add separate shaders for the scene and overlay to the Vulkan project and add some notes about future work

  • Property mode set to 100644
File size: 4.1 KB
Line 
1NOTE: NewOpenGLGame uses a 32-bit build, whule VulkanGame uses a 64-bit build.
2Because of this, it's necessary to switch the glfw3 lib files when switching projects.
3TODO: Make NewOpenGLGame work with a 64-bit build
4
5Installation Instructions for Linux
6---------------------------------------
7
8sudo apt-get install xorg-dev libglew-dev libglm-dev
9
10make newgame && ./newgame
11
12(Old Linux instructions for compiling game.cpp)
13-sudo apt-get install cmake xorg-dev libglew-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
14
15-Compile GLFW3 from source
16 (cmake . && make && sudo make install)
17
18Installation Instructions for OSX
19---------------------------------------
20
21brew install glew
22brew install glfw --without-shared-library
23brew install glm
24
25This should place all necessary files (or possibly symlinks to them) in
26/usr/loca/include and /usr/local/lib.
27
28Run 'xcode-select --install'
29This should make g++ check for libraries in /usr/local/
30
31If the above command gives you the following error, you should be able to move on and compile the game.
32"xcode-select: error: command line tools are already installed, use "Software Update" to install updates"
33
34make newgame && ./newgame
35
36Installation Instructions for Windows
37---------------------------------------
38
39Download the pre=compiled 32bit binaries of GLFW and GLEW. Create lib/ and
40include/ folders in the root opengl-game directory you cloned.
41Copy the include/GL/ and include/GLFW/ folders into your include/ folder.
42
43For GLEW, copy lib/RELEASE/Win32/glew32s.lib into your lib folder.
44For GLFW, copy lib-vc2015/glfw3.lib into your lib folder.
45
46Download GLM and copy the glm folder (the one with all the .hpp files) into the include/ folder you made above.
47GLM is a header-only library, so there is nothing to copy into the lib/ folder.
48
49Open and run NewOpenGLGame.sln in Visual Studio 2017 and run it.
50
51
52--------------------
53VULKAN INSTRUCTIOS
54--------------------
55
56Windows
57--------
58
59Create an include directory inside the opengl-game folder
60
61Download GLM and copy the glm folder into your include directory
62
63Download the 64bit pre-compiledbinaries of GLFW3
64 - Copy lib-vc2019/glfw3.lib into your lib directory
65 - Copy the whole include/GLFW directory into your include directory
66
67Download the SDL2 pre-built Windows binaries
68 - Copy the SDL2 include folder into /include and rename it SDL2
69 - Copy the contents of lib/x64 to lib
70
71Download the SDL2_image Visual C++ development libraries from https://www.libsdl.org/projects/SDL_image/
72Download the SDL2_ttf Visual C++ development libraries from https://www.libsdl.org/projects/SDL_ttf/
73(Might use SDL2_gfx later as well)
74
75Copy the 64-bit static libraries to the lib directory you created above
76
77TODO: Figure out how to do static compilation with SDL2
78
79Since I'm currently using dynamic SDL2 libraries for Windows, some DLLs from sdl2-ttf and sdl2-image
80
81Download the vulkan sdk
82 - Add the location of the Include folder to the VS2019 project properties under C/C++ -> General -> Addition Include DIrectories
83 - Add the location of the Lib folder to the VS2019 project properties under Linker -> General -> Addition Library DIrectories
84
85Linux:
86--------
87
88Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
89
90sudo apt-get install libxcb1-dev xorg-dev libsdl2-dev libglm-dev
91
92source setup-env.sh into your current shell
93
94make vulkangame && ./vulkangame
95
96OSX
97--------
98
99Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
100
101brew install sdl2 sdl2_image sdl2_ttf
102
103make vulkangame && ./vulkangame
104
105REFERENCE
106----------
107
108UV coords 0 u 1 x, y, z -1 (untransformed z ranges from 0 to 1, glm::perspective seems to make the z range negative)
109 0 -------> ^
110 | |
111 v | -1 | 0 1
112 | <-----|----->
113 1 V /|
114 / |
115 1 v
116 1
117
118DEPLOYMENT
119-----------
120
121The deploy folder has an old Inno Setup script for deploying the game on Windows.
122
123I should check out IzPack. Seems to be a cross-platform solution.
Note: See TracBrowser for help on using the repository browser.