DirectX 50% faster than OpenGL ?

I have ported our game from Windows Desktop to Windows Cross Platform Desktop to make it available on Linux and Mac platforms. On the same Windows PC i see that the framerate from the Windows desktop version ( DirectX) is 626 frames ( left example). When i start it under the Cross Platform Desktop ( OpenGL ) if have a framerate of 337 ( right example).

Is there a reason for? ( for the game itself it is not a huge problem because in release mode it always runs in a steady 60fps ) Just curious about this frame rate difference.

HI, Apologies, but I can’t help you with the problem as I’ve only ever done windows DX stuff and not even looked at how to port games over, so the reason for the post…

The screen shots, the artwork looks really nice, well done!

I cant provide a difinitive answer for you but I can say from what Ive seen from the OpenTK source not everything is done in the most optimal way (which monogame uses to handle the OpenGL stuff) and its possible that a good portion of its functionality that MonoGame uses(At the current release i believe utilizes game window?) ends up doing alot of extra unnecessary work to ensure no errors that directX may not exactly need to do.

While 3.5 does use OpenTK, the newer build of Monogame no longer does. It uses its own custom bindings. That said, even with the custom bindings I can observe a slight performance drop with a cross platform build.

To OP, keep in mind also that frame rate does not decrease linearly. See this article.

1 Like