Sign in to follow this  

Unusual frame rate boost

This topic is 1970 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi

I am going to avoid writing any DX code as this really occurs with anything rendered (even examples in SharpDX).

Lets take the minitri DX10 example in SharpDX with a standard FPS timer rendered in DX

Add a XAML text box to the grid



Add a MouseMove event to any window (grid, canvas, window etc) and capture the mouse position in this event(RenderImage is the 'DX Image' name, which is Canvas1 in SharpDX examples);


private void Mouse_Pos(object sender, System.Windows.Input.MouseEventArgs e)
{
MousePos.Text = e.GetPosition(RenderImage).ToString();
/../
}

Now when I load the app, FPS almost doubles when I move the mouse and the image, mesh, animation etc speeds up :/ its like the program decides to double its speed, and actually manages to do it really nicely yet obviously too

If I change MousePos.Text to this.Title, so the windows title pane changes its text to the mouse position things run smoothly despite the mouse moving.

The same thing happens with labels, this only occurs IF the actual text is being rendered on the grid, now sure I could just directly have this rendered via directx text but for the sake of things why would rendering or the general speed of the app rapidly increase or am I just doing something awfully wrong? ;)

PS. This also occurs when you have a label / text box change its contents to whatever key is pressed, although it isnt as noticeable

Share this post


Link to post
Share on other sites
In my applications I force a frame-rate limit and measure the elapsed time to smooth movement and animations. Fluctuating frame rates (within reason) are not uncommon. Without seeing any code I can only assume.

If you really want to know what is going on I'd recomned you profile your code with PIX.

Share this post


Link to post
Share on other sites

This topic is 1970 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this