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
RevLine 
[cbe946d]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
[cfda3b2]5Installation Instructions for Linux
6---------------------------------------
7
[fe70cd3]8sudo apt-get install xorg-dev libglew-dev libglm-dev
[cfda3b2]9
[885f0bb]10make newgame && ./newgame
[669c4e6]11
[885f0bb]12(Old Linux instructions for compiling game.cpp)
[fe70cd3]13-sudo apt-get install cmake xorg-dev libglew-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
[03f4c64]14
15-Compile GLFW3 from source
16 (cmake . && make && sudo make install)
[cfda3b2]17
[5a643d3]18Installation Instructions for OSX
19---------------------------------------
20
[fc424f6]21brew install glew
[e6bc0f4]22brew install glfw --without-shared-library
[fc424f6]23brew install glm
24
25This should place all necessary files (or possibly symlinks to them) in
26/usr/loca/include and /usr/local/lib.
[4d52702]27
[5a643d3]28Run 'xcode-select --install'
29This should make g++ check for libraries in /usr/local/
30
[58088c0]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
[885f0bb]34make newgame && ./newgame
35
[cfda3b2]36Installation Instructions for Windows
37---------------------------------------
[4d52702]38
[cbe946d]39Download the pre=compiled 32bit binaries of GLFW and GLEW. Create lib/ and
[dba67b2]40include/ folders in the root opengl-game directory you cloned.
41Copy the include/GL/ and include/GLFW/ folders into your include/ folder.
[21de283]42
[dba67b2]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
[58088c0]49Open and run NewOpenGLGame.sln in Visual Studio 2017 and run it.
[03f4c64]50
51
52--------------------
[ab65f84]53VULKAN INSTRUCTIOS
54--------------------
55
56Windows
57--------
58
[1c6cd5e]59Create an include directory inside the opengl-game folder
60
[cbe946d]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
[5f3dba8]66
[1c6cd5e]67Download the SDL2 pre-built Windows binaries
68 - Copy the SDL2 include folder into /include and rename it SDL2
[5f3dba8]69 - Copy the contents of lib/x64 to lib
70
[cbe946d]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)
[5f3dba8]74
[cbe946d]75Copy the 64-bit static libraries to the lib directory you created above
[5f3dba8]76
77TODO: Figure out how to do static compilation with SDL2
[1c6cd5e]78
[cbe946d]79Since I'm currently using dynamic SDL2 libraries for Windows, some DLLs from sdl2-ttf and sdl2-image
80
[1c6cd5e]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
[03f4c64]84
85Linux:
[ab65f84]86--------
[03f4c64]87
[ab65f84]88Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
[03f4c64]89
[1c6cd5e]90sudo apt-get install libxcb1-dev xorg-dev libsdl2-dev libglm-dev
91
[b6127d2]92source setup-env.sh into your current shell
93
[1c6cd5e]94make vulkangame && ./vulkangame
[f898c5f]95
96OSX
[ab65f84]97--------
98
99Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
[f898c5f]100
[c8c6da8]101brew install sdl2 sdl2_image sdl2_ttf
[1c6cd5e]102
103make vulkangame && ./vulkangame
[fba08f2]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
[5f3dba8]116 1
[e1a7f5a]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.