且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以在Windows Phone 8应用中使用OpenGL ES吗?

更新时间:2022-10-15 09:45:37

WP8不支持OpenGL,但支持Direct 3D功能级别9_3.如果您希望将游戏从OpenGL ES移植到D3D,请查看角度项目. Angle Project帮助缩小OpenGL ES 2.0和D3D 9之间的鸿沟.它还没有WP8目标,并且您会遇到WP8不支持运行时编译着色器的问题,但是Angle项目仍然是不错的第一步. /p>

无论哪种方式,要使游戏具有与其他平台的可移植性,***使用诸如MonoGame,Unity,Cocos2D,Havok,Marmalade,SharpDX,Ogre,Autodesk Scaleform等中间件游戏框架.这些引擎将在自己的框架内为您处理跨平台支持(每个引擎在代码和资产可移植性上都有其自身的局限性).

如果您已经有一个现有的OpenGL游戏,则要移植到WP8,***的选择是Angle项目.如果您只是开始创建一个跨平台的便携式游戏,那么选择适合您游戏需求的游戏中间件框架是您的***选择.

I've read places that Windows Phone 8 will not support OpenGL, and I'm unable to find anything useful in the SDK.

So am I or will I ever be able to use OpenGL (ES) in my Windows Phone 8 game? I have a game I would like not to rewrite completely to DirectX when porting.

Please cite good sources, the only thing I've found are speculations and blog posts with little to no information.

OpenGL isn't supported on WP8, but Direct 3D feature level 9_3 is supported. If you're looking to port over a game from OpenGL ES over to D3D have a look at the Angle Project. Angle Project helps bridge the gap between OpenGL ES 2.0 and D3D 9. It doesn't have WP8 targeting just yet and you'll have issues with runtime compile shaders not being supported on WP8, but Angle project is still a good first step.

Either way, for games portability with other platforms it's really best if you work with a middleware gaming framework such as MonoGame, Unity, Cocos2D, Havok, Marmalade, SharpDX, Ogre, Autodesk Scaleform or others. These engines will mostly handle cross platform support for you within their own framework (each with it's own limitations on code and assets portability).

If you already have an existing OpenGL game you want to port over to WP8, than Angle project if your best bet going forward. If you're just starting out creating a cross-platform portable game than choosing a gaming middleware framework that seems right for your game's needs is the way to go.