Windows 如何设置GraphicsDevice.GraphicsProfile
在经典XNA应用程序中,此值通过应用程序属性设置 默认情况下,此值至少在我当前使用的机器上设置为Windows 如何设置GraphicsDevice.GraphicsProfile,windows,xna,xamarin.android,monogame,Windows,Xna,Xamarin.android,Monogame,在经典XNA应用程序中,此值通过应用程序属性设置 默认情况下,此值至少在我当前使用的机器上设置为HiDef。但必须将其设置为Reach才能运行 我的问题是,我没有找到任何方法来使用monogame有效地改变这个值。属性窗口显然与XNA不同,我没有找到任何配置值 在游戏构造函数或加载内容方法中更改代码中的值并不能解决我的问题 PS:我的原始问题,我认为是由这个GraphicsDevice.GraphicsProfile引起的,是在构造函数方法中,为GraphicsDeviceManager创建新
HiDef
。但必须将其设置为Reach
才能运行
我的问题是,我没有找到任何方法来使用monogame有效地改变这个值。属性窗口显然与XNA不同,我没有找到任何配置值
在游戏
构造函数或加载内容
方法中更改代码中的值并不能解决我的问题
PS:我的原始问题,我认为是由这个
GraphicsDevice.GraphicsProfile
引起的,是在构造函数方法中,为GraphicsDeviceManager创建新的事件处理程序:
graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs (graphics_PreparingDeviceSettings);
谢谢,看起来不错,但是。。。我正在试图找到我的
preparingdevicesettingeventargs
对象没有任何GraphicsProfile属性的原因。只有适配器、设备类型、PresentationParameters
。我不明白同一类的两个实现如何出现在MonoGame.Microsoft.Xna.Framework
和MonoGame.Microsoft.Xna.Framework.Graphics
中。…Framework
中的一个是由PreparingDeviceSettingEventArgs
使用的,但另一个包含属性GraphicsProfile
。(我觉得我错过了一件非常愚蠢的事情……)我想是你给了我答案。我的代码仍然没有运行,但我认为这是另一个问题。所以我的故事现在继续。
void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.GraphicsProfile = GraphicsProfile.Reach;
}