This project simulates a solar system consisting of a sun, earth, and moon represented by cubes. It is built in C++ using the OpenGL API along with the following libraries:
- GLFW3
- GLAD
- GLM
The app contains the following keyboard controls:
- Press
pon your keyboard to capture the screen into a ppm image - Press
bto render the world in debug mode - Press
escto close the window
Below is a video displaying how the project runs:
To setup the project, you need to setup the GLFW3, GLAD, and GLM libraries. Follow the steps in the following link to setup GLFW3, GLAD, and other system specific dependencies, https://learnopengl.com/Getting-started/Creating-a-window. Furthermore, the glad.c file must be placed in the src/ folder. You can use the official glm github page to install and setup the library https://github.com/g-truc/glm.
After setting up all the libraries, open Makefile and add your include and lib paths.
INCDIR = # Include dir that contains glfw3, glad, and GLM header files
LIBDIR = # Lib dir that contains glfw3, glad, and GLM library filesTo run this project, execute the run.sh shell script. This will build and start the application. You can also build the application yourself by running make command in the root directory of the project.
makeAfter building the project, the executable will be found in the src/ folder. For the executable to propery run the application, you must run the executable from within the src/ folder.
cd src/
./SolarSim