A 3D rollercoaster simulator built in C++ using OpenGL 4.6, GLFW, GLEW, and GLM.
The wagon follows a predefined track with smooth interpolation, textured train, track, frame, and plane models, and basic lighting via shaders.
- Wagon moves automatically along a 3D track
- Two camera modes: follow wagon or free observer
- Textured objects: train, track, frame, plane
- Lighting with two point light sources
- Shader-based rendering (vertex + fragment)
- Wagon speed interpolation for smooth movement
| Key | Action |
|---|---|
C |
Toggle observer/follow camera mode |
UP Arrow |
Move camera closer (observer mode) |
DOWN Arrow |
Move camera farther (observer mode) |
- C++ 17/20
- OpenGL 4.6
- GLFW, GLEW, GLM
- LodePNG for PNG textures
- Custom shader system (
ShaderProgram)
- Clone the repo:
git clone https://github.com/yourusername/rollercoaster-simulator.gitOpen in Visual Studio (solution file included: Rollercoaster Simulator.sln)
Make sure to set x64 or Win32 depending on your system
Add include paths for GLFW, GLEW, and GLM
Link libraries: glew32.lib, glfw3.lib, glfw3dll.lib
Build and run the solution
Place textures (czerwony_metal.png, metal.png, plane.png, zolty_metal.png) in the executable working directory