https://github.com/kyriacos/colorbuffer
Simple and fast colorbuffer for games and stuff
https://github.com/kyriacos/colorbuffer
colorbuffer framebuffer game-development go go-sdl2 golang image-manipulation image-processing sdl2
Last synced: 2 months ago
JSON representation
Simple and fast colorbuffer for games and stuff
- Host: GitHub
- URL: https://github.com/kyriacos/colorbuffer
- Owner: kyriacos
- License: mit
- Created: 2020-01-06T21:17:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-06T21:23:27.000Z (about 6 years ago)
- Last Synced: 2025-12-17T14:50:40.606Z (3 months ago)
- Topics: colorbuffer, framebuffer, game-development, go, go-sdl2, golang, image-manipulation, image-processing, sdl2
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ColorBuffer - Simple and fast colorbuffer for games and stuff
The motivation behind this package is that i found myself recreating it time and time again every time I needed just a simple colorbuffer so I could change some pixel values in a byte array and render stuff to the screen either with SDL or just in the terminal.
I tried using the image.RGBA package that's native to Go but I realized after running a few benchmarks it was actually quite slow. Even when using RGBAAt and SetRGBA directly. After a few experiments I just went back to maintaining a plain buffer myself and added a few convenience methods for it.
Check out my other project, a [Go Raycaster](https://github.com/kyriacos/go-raycaster) where I added a bit more detail on how this came about.
I have a few more ideas about extending it further. As always feedback and issues are always welcomed.
## Todo
- [ ] Add helper utils for parsing the hex colors
- [ ] Add go doc
- [ ] Add example
- [ ] Add Bounds method so it's closer to the image implementation?
- [ ] Add byte order support (rgba vs bgra) - benchmark
- [ ] Add CI
- [ ] Add quick byte check b[3]
- [ ] Parallel?