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.
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.
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.
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.