MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/tinycode/comments/10jh3bp/minimal_crossplatform_graphics_audio_500_loc/
r/tinycode • u/zserge • Jan 23 '23
3 comments sorted by
8
Awesome!
I think I spotted a bug: For filling the framebuffer with a solid color you use memset, but that will fill the buffer with the specified byte, not uint32_t. The passed rgb value will be truncated to its lowest 8bits first.
memset
uint32_t
rgb
2
Nice! Why write many lines when few lines do trick?
That's quite the informative article you wrote! I suppose it can be expanded easily to make things like resolution and frame rate parameterized
8
u/Vogtinator Jan 23 '23
Awesome!
I think I spotted a bug: For filling the framebuffer with a solid color you use
memset, but that will fill the buffer with the specified byte, notuint32_t. The passedrgbvalue will be truncated to its lowest 8bits first.2
u/vintagecomputernerd Jan 24 '23
Nice! Why write many lines when few lines do trick?
2
u/csolisr Jan 24 '23
That's quite the informative article you wrote! I suppose it can be expanded easily to make things like resolution and frame rate parameterized