Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/263.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
C# XNA 4.0在GF 640M上以每秒30帧的速度运行,但在集成Intel卡上运行良好_C#_Xna_Nvidia - Fatal编程技术网

C# XNA 4.0在GF 640M上以每秒30帧的速度运行,但在集成Intel卡上运行良好

C# XNA 4.0在GF 640M上以每秒30帧的速度运行,但在集成Intel卡上运行良好,c#,xna,nvidia,C#,Xna,Nvidia,每次我用集成显卡运行我的游戏,它以每秒60帧的速度运行。但有时当屏幕上有很多粒子时,它会滞后太多 所以我切换到Nvidia GeForce 640M,但帧速率保持在30而不是60。我尝试了Reach和HiDef,但它们都无法解决帧率问题。我也试过了 this.TargetElapsedTime = TimeSpan.FromMilliseconds(15); 但FPS仍然是30 也尝试过这个,但没有成功: public Game1() { graphics = new Graphics

每次我用集成显卡运行我的游戏,它以每秒60帧的速度运行。但有时当屏幕上有很多粒子时,它会滞后太多

所以我切换到Nvidia GeForce 640M,但帧速率保持在30而不是60。我尝试了Reach和HiDef,但它们都无法解决帧率问题。我也试过了

this.TargetElapsedTime = TimeSpan.FromMilliseconds(15);
但FPS仍然是30

也尝试过这个,但没有成功:

public Game1()
{
    graphics = new GraphicsDeviceManager(this);
    Content.RootDirectory = "Content";
    graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings);
}

private void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
    e.GraphicsDeviceInformation.PresentationParameters.MultiSampleCount = 4;
    e.GraphicsDeviceInformation.PresentationParameters.PresentationInterval = PresentInterval.One;
}
公共游戏1()
{
graphics=新的GraphicsDeviceManager(此);
Content.RootDirectory=“Content”;
graphics.PreparingDeviceSettings+=新事件处理程序(graphics_PreparingDeviceSettings);
}
私有无效图形\u准备设备设置(对象发送方、准备设备设置事件参数e)
{
e、 GraphicsDeviceInformation.PresentationParameters.MultiSampleCount=4;
e、 GraphicsDeviceInformation.PresentationParameters.PresentationInterval=PresentInterval.One;
}

如何修复Nvidia图形卡上的帧速率?

您是否尝试过更改
PresentationParameters.PresentationInterval

如果我没记错的话,如果您将其设置为
PresentInterval.One
,它“退出所有停止”,并尝试匹配最大刷新率


我已经有一段时间没有修改XNA tho…

可能与您的vsync设置有关。试试下面的方法

graphics.SynchronizeWithVerticalRetrace = false;

不,离散图形教学仍然落后,这是否意味着你已经尝试过改变演示间隔?哦,一定要尝试其他的东西,而不是PresentInterval。还有一个-我是从旧的记忆那里来的。