Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 1.66 KB

File metadata and controls

36 lines (29 loc) · 1.66 KB

Solar Sim

Description

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:

  1. GLFW3
  2. GLAD
  3. GLM

The app contains the following keyboard controls:

  1. Press p on your keyboard to capture the screen into a ppm image
  2. Press b to render the world in debug mode
  3. Press esc to close the window

Below is a video displaying how the project runs:

YouTube

Setup

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 files

How to run

To 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.

make

After 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