Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shlomnissan/raycaster-gl
A simple raycasting engine demo using OpenGL and modern C++
https://github.com/shlomnissan/raycaster-gl
cmake cpp20 modern-cpp raycasting raycasting-engine
Last synced: about 22 hours ago
JSON representation
A simple raycasting engine demo using OpenGL and modern C++
- Host: GitHub
- URL: https://github.com/shlomnissan/raycaster-gl
- Owner: shlomnissan
- Created: 2024-07-10T21:25:12.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-24T20:41:42.000Z (4 months ago)
- Last Synced: 2024-10-13T16:20:57.380Z (about 1 month ago)
- Topics: cmake, cpp20, modern-cpp, raycasting, raycasting-engine
- Language: C
- Homepage:
- Size: 252 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Raycaster
A simple raycasting engine using OpenGL and modern C++.
## Overview
This project implements a simple raycasting engine using algorithms similar to those in Wolfenstein 3D to generate a pseudo-3D maze with texture mapping and sprites. It uses GLFW to create a window and handle events, and OpenGL as the primary graphics API.
Although OpenGL is used for rendering, this project does not utilize traditional geometry to render the maze. Instead, it uses OpenGL to render a single textured quad that covers the screen. All pixel operations are performed on a buffer, which updates the quad's texture every frame.
The purpose of this project is to refamiliarize myself with ray casting. Even though this is an old technique, building a simple raycasting engine offers valuable lessons for modern graphics programming. Concepts like casting rays, dealing with projection planes, and revisiting basic trigonometry remain relevant.
Note that this project doesn’t follow the popular [Lode’s Raycasting Tutorial](https://lodev.org/cgtutor/raycasting.html). The primary difference is that I’m using polar coordinates to represent some positions and directions, which is more aligned with the original [Wolfenstein3D source-code](https://github.com/id-Software/wolf3d).