Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 如何设置GraphicsDevice.GraphicsProfile_Windows_Xna_Xamarin.android_Monogame - Fatal编程技术网

Windows 如何设置GraphicsDevice.GraphicsProfile

Windows 如何设置GraphicsDevice.GraphicsProfile,windows,xna,xamarin.android,monogame,Windows,Xna,Xamarin.android,Monogame,在经典XNA应用程序中,此值通过应用程序属性设置 默认情况下,此值至少在我当前使用的机器上设置为HiDef。但必须将其设置为Reach才能运行 我的问题是,我没有找到任何方法来使用monogame有效地改变这个值。属性窗口显然与XNA不同,我没有找到任何配置值 在游戏构造函数或加载内容方法中更改代码中的值并不能解决我的问题 PS:我的原始问题,我认为是由这个GraphicsDevice.GraphicsProfile引起的,是在构造函数方法中,为GraphicsDeviceManager创建新

在经典XNA应用程序中,此值通过应用程序属性设置

默认情况下,此值至少在我当前使用的机器上设置为
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;
}