CPU Usage on Windows (general question)
-
Hi folks ! I am writing a video game with Direct-X and C++. I found that I use nearly 98% of the CPU usage. My specialty is embedded software where I can control the CPU usage because there is generally only one software in the system. But now, I write a game that "run" under Windows with other application. The PRIORITY LEVEL is set to NORMAL and I have a big loop (this is not EVEN-DRIVEN). The loop runs until a receive a QUIT message. For each loop, I look for Windows Message and execute it if I have one. If there is no Windows message, I render (update) the graphics of my game. So I use CPU for my game when the CPU is not busy. I have checked some other sample of games and they all reach 99% of the CPU usage. Is there something that I don't understand ? If some software has PRORITY LEVEL higher than normal, will it takes some CPU and the CPU usage of my game will drop ? Thanks for your comment.:-D
Danny Gilbert, enginneer Montréal, Canada