1
votes

I'm designing a C# framework to make vector-based games using Cairo. Currently I'm using Tao and Mono.Cairo to create a Cairo context that draws to an SDL surface, and then draw that surface to the screen. The source code is available here.

At first I thought it was working really well, rendering a ton of stuff at decent speeds... but then I tried to run it fullscreen at 1080p and it suddenly slowed way down.

I was reading a lot about it, and somewhere I saw someone say that maybe using OpenGL for rendering would improve performance for 2D drawing over using SDL... is this the case? Would it be worth it? Or are there any other options that I'm missing?

It just seems crazy to me that drawing a few shapes to the screen would be so difficult, especially seeing as how awesome the rest of Cairo seems to be.

1

1 Answers

1
votes

I don't know about Cairo specifically, especially since it's the mono variant of it, but when developing a seemingly simple engine to render mesh sets a while back using Helix 3D, a similar WPF-rendering toolkit to Tao, I noticed that when I rendered my samples and small meshes it worked fine, but when I tried to render larger areas at bigger resolutions, the performance was lackluster.

I think it all boils down to the fact that these toolkits are perfect for your everyday rendering and small projects, but when you're looking to develop games or something that's supposed to perform well even at high resolutions, the optimisation and tweaking that OpenGL and DirectX have behind them are unmatched, and they will almost always outperform the smaller fish.

For me personally when I transfered over to using DirectX, I got near-perfect performance when rendering the exact same set of meshes as with Helix 3D. So yes, there is a certain merit in working with the bigger frameworks. It is probably worth it.