Crazy FPS - please help

LDV

Active member
Joined
Dec 29, 2003
Messages
31
Hi Guys,

I wrote a short game in C# Managed DirectX, using the Direct3D interface.

In my computer and Graphic Card, the FPS is being controlled by the Screen Refresh Rate ... means 85FPS when using PresentationInterval=default.

When im using PresentationInterval=immidiate it gets to 300FPS !

On others computers the PresentationInterval - default doest not work !! - and i cant see the graphics ... why is it?
- and the Refresh Rate is not being used to synchronize the program. I want it always to work with PresentationInterval - default so i can use the screen refresh rate to update the screen and not to have 300FPS.

10x, LDV
 
Heres some source code I found on my book:

Do While Not Gameover
If system.Environment.TickCount - LastTick >= 1000 / DesiredFrameRate Then

<Other Rendering Code>
lastTick = System.Environment.TickCount

End If

Application.DoEvents

Loop
 
Back
Top