Page 1 of 1

Drawing sprites with citro2d is slow?

Posted: Fri Mar 06, 2020 2:36 am
by TheGag96
I've been making a homebrew game for a little while now using citro2d. Through making it, I've noticed that citro2d, at least through the way the gpusprites demo draws sprites, can only get around 350 sprites drawn to both screens (~700 total draws) before it starts to lag on o3DS. I know the console is more capable than that, but I cannot figure out how you're supposed to draw sprites efficiently with this library. With those sorts of numbers, there's no way you could draw tile-based graphics without collapsing groups of tiles into single textures or something, and even then, you'd still be pushing things.

I don't know much about graphics programming, but I was wondering if it's because citro2d has no kind of sprite batching and is thus spending a bunch of time switching textures unnecessarily. That's just a wild guess though... Anyone know what's wrong? Is it me? Is it the library? Thanks!

Re: Drawing sprites with citro2d is slow?

Posted: Sun Mar 08, 2020 8:11 pm
by TheGag96
I went through and looked at citro2d to see if it had anything to prevent unnecessary texture switching. It actually does have some checks for that, and when I tried recompiling with them off to see what would happen, I could draw even fewer sprites before things slowed down. So that's definitely not it... Any ideas?