开发者

ContentManager in console mode?

Is there a way to setup a ContentManager without using a GraphicsDevice? It's a console app..

The problem is I get a "Reach profi开发者_StackOverflow中文版le" not supported, is there a way to make it without needing DirectX?


ContentManager takes an IServiceProvider. It is best to create a class that implements IServiceProvider with your own behavior rather than just using Game or GraphicsDevice.

From msdn:

"Caution When creating a new ContentManager, if no instance of Game is otherwise required by the application, it is often better to create a new class that implements the IServiceProvider interface rather than creating an instance of Game just to create a new instance of GraphicsDeviceManager."

http://msdn.microsoft.com/en-us/library/bb195757.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜