Monogame vs Sharpdx ?

Hi. ~

I need C# DirectX .

I found Monogame and Sharpdx.

but i don’t know what is different .

Monogame is Sharpdx Sub Lib?

or different?

Can Monogame use 3D(triangle or many triangle(1000k)) ?

How about Monogame 3D performance and Sharpdx performance ?

Thank you.

Mini games uses the sharpdx api. Basically makes game development easier. As for performance I can render over 200,000 trinagles with lighting at 60fps on my slow laptop.

I believe MonoGame is a wrapper for SharpDX and SharpDX is a wrapper for DirectX?

So you are basically making high level calls to DirectX code.

(I may be incorrect)

GPU performance is about as good as it gets with a DirectX11 renderer, unless you need some special features like Compute and Geometry Shaders. Doesn’t really matter if you use the wrapper or directX for C++.

MonoGame and SharpDX have a bit more CPU overhead due to the Mono environment with garbage collection and stuff, but that’s usually secondary.

1 million triangles are no problem

For example in the picture below I render about 1.5 million triangles with some pretty expensive per pixel lighting calculations and it yields in 180 fps on a 5 year old machine.

Vertex shaders are rarely the most limiting factor today, the pixel calculations are usually more expensive.

2 Likes

Oh…My…God…!!

Example is Monogame platform?

Thank you very much.!!!

yeah, Monogame DirectX version

How hard is it to make that same example work in a MonoGame DesktopGL project? If you care to give it a try, what’s the performance gap between the two approaches?

I ask because OpenGL has the advantage of cross platform, but it’s not clear (to me) what the other pros and cons are between the two approaches.

I tried to setup a gamepad and it didn’t work, that’s all I can say about OpenGL sadly :frowning:

It should be as easy as switching out the MonoGame reference. Performance with DX on my windows pc is a lot better than OpenGL, but I don’t know if that’s always the case.

If you want to share this or some other project, I could try it out on a Windows laptop I have, both GL and DX, and we could collect another data point.

Windows itself limits OpenGL performance. Not exactly sure on how or why. (My guess is maybe make DirectX a more favorable platform since its a Microsoft product) I cant exactly remember where. But I read an article where someone made the exact same “game” in OpenGL and DirectX and when the OpenGL version was run on PC/MAC/Linux I think the MAC/Linux tests were reaching 100+ fps while PC was limited to around 80 I think. (Not 100% on those numbers) while the DirectX was 100+ fps on the PC. Its something to take into consideration since MOST of the market for desktop computer games is Windows. I would say make DirectX version of your game for PC and make a separate OpenGL version if you want to target other platforms.

Necromancer !? :slight_smile: (20 chars limit)

sorry i couldn’t resist this pic just cracks me up.

This is a scary puppy indeed :fearful: wouldnot like to see one getting out of under my car… What could he do…