Skip to content

AlxHnr/3d-opengl-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

screenshot

Basic 3D OpenGL demo with a first-person camera. Shaders are (re)loaded at runtime to allow live editing.

Building and running the demo

Requires Nim (0.17.0 or higher), SDL2 (with development files) and its Nim bindings:

nimble install basic3d sdl2 opengl

Build and run the demo:

make run

Controls

  • W - Move forward
  • A - Move left
  • S - Move back
  • D - Move right
  • Q - Move up
  • E - Move down
  • G - Toggle wireframe
  • hold space - Fast movement
  • hold shift - Slow movement
  • drag left mouse button - Move sun or spline points
  • drag right mouse button - Rotate camera

Screenshots

screenshot screenshot screenshot

git checkout c46d988

screenshot

git checkout be9d0c0

screenshot