Skip to content

yangosoft/OpenGL_Flightsim

 
 

Repository files navigation

OpenGL Flight Simulator

You can read an article about how it works here. There is also a compiled demo available.

Flightsim_2023-02-26_20-58-28.mp4

Controls

The demo supports input with a keyboard and a joystick. With a keyboard, use WASD to control pitch and roll and F and K to increase and decrease thrust. E and Q control the rudder. You can use P to pause and O to toggle the camera.

Build instructions (Windows)

To build this project we need glm, SDL2 and GLEW. Download these libraries and put them in some location you can find again. As you will see, I put them in 'libraries'. After opening the Visual Studio 2022 project go to the 'Property Pages' for the solution and set 'C/C++' -> 'General' -> 'Additional Include Directories' to your GLEW, SDL2 and glm include paths. Next we go to 'Linker' in the 'Property Pages' and set 'General' -> Additional Library Directories' to the appropriate paths. Finally we set 'Linker' -> 'Input' -> 'Additional Dependencies' to include SDL2.lib, SDL2main.lib, glew32.lib and opengl32.lib. You may also have to set your environement variables to include 'opengl32.dll' and SDL2.dll.

About

A simple but realistic looking flight model in C++, from scratch.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 82.2%
  • C 17.5%
  • GLSL 0.3%