Can MonoGame Fully Support SharpDX Syntax?

I think MonoGame Windows Project is using SharpDX right?
I was using SharpDX to develop a project, and now I want to migrate it to MonoGame but there are many differences in coding. Such as “Keyboard” <-> “KeyboardManager”, “Texture2D.New()” <-> “new Texture2D()” …
As a united framework, I wish MonoGame can add some “syntactic sugar” or something to support these syntax. So we can just change “using” lines to migrate SharpDX projects to MonoGame projects and then cross to other platforms.
Thanks!

SharpDX is heavily relying on automatically generating code from the C++ codebase of DirectX. I don’t think MonoGame should break the syntax of XNA in favour of the generated syntax of SharpDX.

It is also important to note that while SharpDX.Toolkit is similar to XNA (and MonoGame), it is nowhere as strict about following XNA standards as MonoGame is. For example in XNA and MonoGame, LoadContent is only called by Initialize, a single time at startup. When the graphics device is reset and the assets are lost (for example on every single resume on WP8), assets that use ContentManager are reloaded automatically, the rest have to be reloade manually.
In SharpDX.Toolkit, LoadContent is called on every single graphics device reset, but Initialize is only called at startup.

1 Like

Thanks for the reply! Learned a lot. :smile:

So I will convert my code manually… :frowning:

Although SharpDX has a lot of “automatically generating code”, it still has some good improvements.
For example, when I check mouse buttons’ click, I can use LeftButton.Down in SharpDX, while in XNA(and MonoGame) I have to check that at last frame the mouse button was released and at this frame it is pressed.(Please tell me if there are better ways to do this.)

Since the XNA is almost abandoned by MS, I think maybe we still can add something into MonoGame rather than just keep it 100% similar as XNA. While developers can just use XNA syntax or migrate XNA games to MonoGame without any problem, they can use some original MonoGame functions to make their code simpler and more efficient as well.
(Please forgive me if my idea is totally wrong :stuck_out_tongue: )

P.S. Will MonoGame support tkb files (contents compiled by SharpDX toolkits) ?
P.P.S Where can I find MonoGame Pipeline Tool? I can’t find it anywhere in MonoGame 3.2.