Skip to content

Latest commit

 

History

History
66 lines (56 loc) · 1.5 KB

README.md

File metadata and controls

66 lines (56 loc) · 1.5 KB

Gravity Sim (C++, OpenGL)

A Gravity Simulation created with OpenGL.

GIF


Features


Getting Started

Prerequisites

  • C++ compiler ('clang++' or 'g++')
  • glfw (installed via Homebrew on macOS):
brew install glfw

Clone the Repo

git clone https://github.com/sanketsriv22/gravity.git
cd gravity

Build and Run

If using VSCode, just run build task (Cmd + Shift + B)

g++ -std=c++20 -I/opt/homebrew/Cellar/glfw/3.4/include \
    -L/opt/homebrew/Cellar/glfw/3.4/lib \
    -lglfw *.cpp -o Gravity
./Gravity

Or if you prefer cmake (I've added my CMakeList.txt)

brew install cmake

Create a cmake build in the repo

cmake -S . -B build

Compile/Build (Cmd + Shift + B) And run

./build/gravity

Controls

Future Improvements