LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read PC Graphic card FPS?

HI,

 

I'm trying to make a simple VI that meassures and displays a PCs frame rate.  I am doing this as an enticement to my grandson who is a gamer.

I want to show him the power and ease of LabView.  I am a novice and have just completed LV core 1 &2.

I assume that I need to grab a parameter from my pc etc. 

 

Thanks for any help you can give.

0 Kudos
Message 1 of 4
(2,812 Views)
Not that simple. Frame rate isn't a single parameter, but rather a result of how fast the graphics card can process or create an image. Games require a large amount of graphics processing power to generate realistic scenes, and the quality of the images is inversely related to the frame rate. It also depends on how much the code is optimized to use the graphics card's processor versus the computer's CPU.
0 Kudos
Message 2 of 4
(2,791 Views)

In addition to Nathan's answer you will find that the framerate in most modern games is constantly changing depending on how hard the graphics engine is working at any given moment.  Inside a cave with minimal objects you may have 100FPS, step outside and start rendering to the virtual horizon while simulating a rainstorm and Poof!, you're down to 25FPS.

 

You will have to query the game engine to get the current rate.  There's usually an option to display the FPS in most games.  I'm not sure how an external program would query that value while the game is playing.

 

Instead, how about a nice game of chess??? :  https://lavag.org/topic/18557-chess-game-chess-engine-100-labview/

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 3 of 4
(2,753 Views)

There are lots of applications that hook into DirectX to get the framerate while a game is running (e.g. FRAPS). Perhaps you can find out how to do it in another language and see how you can apply that to LabVIEW (e.g. .NET calls) or perhaps you can talk to another program which is calculating/displaying the FPS.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 4
(2,732 Views)