Jump to content

  • Log In with Google      Sign In   
  • Create Account


Unusual frame rate boost


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Memories are Better   Prime Members   -  Reputation: 769

Like
0Likes
Like

Posted 21 July 2012 - 08:34 AM

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

Sponsor:

#2 DJTN   Members   -  Reputation: 207

Like
1Likes
Like

Posted 21 July 2012 - 09:17 AM

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.

#3 Memories are Better   Prime Members   -  Reputation: 769

Like
0Likes
Like

Posted 21 July 2012 - 09:33 AM

ahh a frame rate limit, that ought to do it, never really thought about that before.

Thanks




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS