OpenGL or DirectX Monogame Template for porting to Windows 8 Phone?

。_饼干妹妹 提交于 2019-12-12 06:48:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!