2

I'm using SharpDX 2.5.0 and I have a game class, and I try to disable the fixed time step, however it doesn't seem to work, I still get 59-60 FPS. I'm only drawing a utah teapot, so I'm pretty sure it must work with a lot more (like 1000) FPS. Here is what I do:

    protected override void LoadContent()
    {
        // ...

        // Disabling fix time step.
        this.IsFixedTimeStep = false;

        // ...

        base.LoadContent();
    }

Do I forget something? Do I have to apply this change somehow? Or am I doing it in the wrong place (I also tried doing it elsewhere without any success)? Thanks for the answers:

Muad'Dib

4

2 回答 2

3

您需要禁用 vsync 和固定时间步长,尝试将其添加到游戏构造函数中:

// GraphicsDeviceManager is mandatory for a Toolkit Game
_graphicsDeviceManager = new GraphicsDeviceManager(this);
// disable vsync
_graphicsDeviceManager.SynchronizeWithVerticalRetrace = false;
// disable fixed timestep
this.IsFixedTimeStep = false;
于 2013-09-12T12:47:54.300 回答
1

您是否也尝试过禁用垂直同步?如果启用了 vsync 并且您的显示器以 60Hz(很可能)运行,那么您也会看到这种行为。我不确定Game课程,但我通常PresentationParameters在创建设备时这样做。

new PresentParameters(width, height) {
    PresentationInterval = PresentInterval.Immediate
}

“立即”表示present 不会等待监视器刷新。

这是假设 D3D9,您使用的是哪个版本的 DirectX?

于 2013-09-08T09:00:06.027 回答