As it turns out, drawing a circle with SDL2 in C++ is harder than you'd think. Unless you'd done it before, but hey, I haven't. I'm looking into something called the Midpoint Circle Algorithm, but at the moment the code only blits integer x and y values. I also temporarily got confused and included <cmath>, but then realised I didn't need it. (cmath is a C++ wrapped C library for math-y functions like log, ln, square rooting, etc.)
I also had some issues where I didn't clear the texture after I made it, and there were some really weird undefined things showing up in the background.
Git commit: 5dca5f
I also had some issues where I didn't clear the texture after I made it, and there were some really weird undefined things showing up in the background.
Git commit: 5dca5f
No comments:
Post a Comment