Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 02 Mar 2012
Offline Last Active Mar 08 2013 10:04 AM

#4919289 Monitoring GPU activity for a DirectX app

Posted by melak47 on 04 March 2012 - 05:18 PM

nvidia inspector will let you monitor GPU load, VRAM usage, clock speed and temperature.

If what you are drawing so far is relatively simple, your app will push the GPU as fast as it can to draw more, and you will get thousands or even tenthousands of fps, with your GPU at 100% load.

Presenting with vsync will make your Present call block until a vsync occurs (every 1/60th second, for example), so if you had 10.000 fps before, your GPU load might drop as low as 1% with vsync.

It's as easy as calling Present(1, 0) instead of Present(0,0).
You could also wait for more vsyncs to save power if you like, for example when your app loses focus.

#4919285 Cartesian system in DirectX

Posted by melak47 on 04 March 2012 - 04:50 PM

The easiest thing would probably be to split it into two draw calls.
set the primitive topology to pointlist before you draw your points, then to linelist before you draw your axes.

your vertex buffer for the axes might look like this:

XMFLOAT3 vertices[] = { XMFLOAT3(0, 0, 0), XMFLOAT3(10, 0, 0),
	 	 	 XMFLOAT3(0, 0, 0), XMFLOAT3(0, 10, 0),
	 	 	 XMFLOAT3(0, 0, 0), XMFLOAT3(0, 0, 10), };