Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a bit confused. The question is: when I'm developing a XNA game for Xbox (or Windows), is it possible to use DirectX (to make use of the GPU)? Or is everything getting calculated by the CPU?

A quick Google search didn't gave any results of combining those two...

share|improve this question
what do you mean "of Windows"? – Prof. Falken Jan 3 '11 at 9:25
up vote 8 down vote accepted

As far as i know, it's no different from PC + XNA: draw calls you make (anything using Spritebatch, any of the DrawIndexedPrimitives, rendering models, etc.) are done via the GPU (since XNA is a layer on DirectX). Anything else goes on the CPU(s).

share|improve this answer
Thanks (15 chars) – Martijn Courteaux Oct 17 '10 at 17:52
correct, and if I remember correctly you can still get direct access to the GPU by writing shaders – LearnCocos2D Oct 17 '10 at 18:21
I can confirm that GamingHorror is correct. XNA has out-of-the-box support for shaders written in HLSL, which could be used to perform various operations directly on the GPU. – Mike Strobel Oct 19 '10 at 14:28

XNA uses Direct3D 9, so you can do pretty much the same things you can do with D3D9 in XNA, without having to deal with some of the lower level plumbing. And, as said, you can use HLSL with XNA to compute stuff on the GPU.

As a rule, most (if not all) of the graphics rendering/computing is done on the GPU, and the rest is done on the CPU.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.