Thursday, December 24, 2009

ViruZ update 3

I moved the draw function into the entity today. I tried fiddling around with a way to effectively buffer the drawing, so it doesn't have to draw the circle again, but can just use that buffer on another position.
I don't think I got it right though. I'm not sure how cairo does things internally, but I'm just not sure.

Well, I tested the performance and I get about 50FPS with 100 outlined and anti-aliased circles, rendering on one core at 2.4Ghz; I'm still not sure how much my graphics-card is used with cairo, but I have a GeForce 9600GT.
This will probably become slower though, since there is no logic done atm, but that result shows me that it'll probably draw fast enough. 30FPS should still look fluent and maybe I can still optimize some stuff. I'm also not too sure that I'll need to draw 100 objects every frame (it's redrawing the whole scene atm).

No comments: