问题
Basically I'm wanting to create a game with MonoGame that works on both Windows Desktop and Windows 8 Phones and I was wondering which MonoGame template for the Windows Desktop Version would be better, the OpenGL template or the DirectX one?
I've heard that Windows 8 Phone doesn't support OpenGL so I'm essentially wanting to know which template would allow me to simply copy and paste most of the code to the Windows Phone Project and have it still work with only minor alterations.
回答1:
The MonoGame framework uses DirectX (via SharpDX) on some of the Microsoft platforms and OpenGL on other platforms. But, this does not change the public interface of MonoGame.
You could probably select DirectX for the desktop (as this is "native") and will always be selected for Windows Store Apps as this is the only framework that has been approved for the Store. And, of course, as there is no DirectX for iOS, Android, Mac and other platforms, MonoGame will select the OpenGL backend.
See here as well: Windows platform using OpenGL and/or DirectX?
DirectX and OpenGL are just the backend of MonoGame
Your choice will not affect the code and you can change wrapper at any time.
来源:https://stackoverflow.com/questions/25281599/opengl-or-directx-monogame-template-for-porting-to-windows-8-phone