1

Could anybody tell me please how can I get framerate of WM_PAINT message in frames per second? I'm trying to make a software renderer, and framerate is very important for debugging.

Triang3l
  • 1,230
  • 9
  • 29

1 Answers1

1

This question was asked previously here. As an additional hint, you can use a dynamically allocated structure to store your FPS-related variables and use SetWindowLongPtr to store a pointer to this structure.

Community
  • 1
  • 1
npclaudiu
  • 2,401
  • 1
  • 18
  • 19
  • I know how to calculate FPS, I want to know how to retrieve frame generation time of WM_PAINT. – Triang3l Jan 12 '12 at 16:17
  • 1
    For that you could use [GetTickCount](http://msdn.microsoft.com/en-us/library/windows/desktop/ms724408(v=vs.85).aspx). – npclaudiu Jan 13 '12 at 11:32