A set of examples for the usage of the sgltk library.
This is a collection of examples intended to show how to use sgltk.
-
Windows
-
Generate the makefiles or project files using
cmake
:cmake -G
to get the list of available generatorscmake -G "generator_name" -DCMAKE_PREFIX_PATH="path/to/include;path/to/lib" .
-
Use
make
or open the project file in the appropriate IDE to build the project
-
-
Linux
-
If sgltk is not yet installed you will have to either install it or initialize this repository's submodules. To do this use
git
:git submodule init
git submodule update
-
Generate the makefiles using
cmake
:cmake .
orcmake path/to/source
-
Build the examples using
make
:make
ormake -j number-of-threads
Every example has a separate build target identically titled to the name of the folder containing that example.
-
- Esc - quit the example
- M - toggle mouse capture
- W/A/S/D - move the camera forward/left/backward/right
- R/F - move the camera up/down
- Q/E - roll the camera
- Ctrl+F - toggle fullscreen
- L - toggle wireframe models
- P - recompile shaders
Depending on the example some of these controls might not be available.