Question

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

Was it helpful?

Solution 2

Have you also tried disabling vsync? If vsync is enabled and your monitor is running at 60Hz (very likely) then you will also see this behaviour. I'm not sure about the Game class but I usually do it in the PresentationParameters when creating the device.

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

"Immediate" indicates that present will not wait for the monitor to refresh.

This is assuming D3D9, which version of DirectX are you using?

OTHER TIPS

You need to disable both vsync and fixed timestep, try to add this to the game constructor:

// GraphicsDeviceManager is mandatory for a Toolkit Game
_graphicsDeviceManager = new GraphicsDeviceManager(this);
// disable vsync
_graphicsDeviceManager.SynchronizeWithVerticalRetrace = false;
// disable fixed timestep
this.IsFixedTimeStep = false;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top