c++ - Is there a way to reduce CPU and GPU load in my simple 2D DirectX game? -


i guess have explaining do:

  • i'm new game programming, please don't mad if don't understand concept immediately
  • the game makes use of directx 10 , written in c++
  • it's simple 2d game

the situation: despite of being simple in both game logic , graphics, still takes cpu , gpu load 100%. menu displayed more 2000 frames per second.

my problem not game runs fast. timed sprite animations , game logic using queryperformancecounter function.

the actual problem game calculates same code numerous times without happening on screen, therefore putting massive load on hardware.

in ways can decrease hardware load of game? feel using sleep "cheating".

thank damon pointing me in right direction, looked present function. (http://msdn.microsoft.com/en-us/library/windows/desktop/bb174576(v=vs.85).aspx)

all took solve both cpu , gpu load problems changing

swapchain->present(0, 0); 

to

swapchain->present(1, 0); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -