Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/notmax6677/opengl-sorting-algorithm
Bubble sort visualizer programmed in OpenGL 3.3
https://github.com/notmax6677/opengl-sorting-algorithm
algorithms bubble-sort opengl
Last synced: 8 days ago
JSON representation
Bubble sort visualizer programmed in OpenGL 3.3
- Host: GitHub
- URL: https://github.com/notmax6677/opengl-sorting-algorithm
- Owner: notmax6677
- Created: 2023-04-23T15:47:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-24T17:59:45.000Z (over 1 year ago)
- Last Synced: 2024-11-07T13:42:50.872Z (about 2 months ago)
- Topics: algorithms, bubble-sort, opengl
- Language: C
- Homepage:
- Size: 20.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenGL-Sorting-Algorithm
Bubble sort visualizer programmed in OpenGL 3.3 _(Using GLAD and GLFW 3.3)_
Not much to say, it looks satisfying i guess. I made this because i saw others do it on the internet and also i wanted to exercise some OpenGL skills at the time of this README's creation, i have just started learning OpenGL a few weeks back.
Build with `./bin/Makefile` for your system, `.exe` is already included because i worked on this on a windows machine.
Use `SPACE` to reset the algorithm and begin the process anew with randomized values.
Do keep note that while the algorithm may seem slow and impractical, this is not the case, it just looks like it because to visualize the process properly for the user, the program only takes one "sorting step" per frame, so if you're running at 60fps, do the math...
However, if need be, this whole process could be done in an instant in a single frame when applied to a real situation.In `./src/headers/settings.hpp` you will find two values:
1) `bool slowSort` - If `true`, the sorting process will be slowed down even further to allow for you to more closely see how it looks.
2) `int arraySize` - Defines the amount of numbers that shall be sorted in the visualized array.
_Remember to build the project again if you choose to change these values, i know it's not the most efficient way but it is what it is ig..._