Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am a mac developer using Unity and I hardly use a PC. When you build a Unity game for Windows, does it use Direct3D or OpenGL?

P.S. I'm not sure if it's called Direct3D or DirectX

share|improve this question

closed as off-topic by Josh Petrie Nov 11 at 17:14

  • This question does not appear to be about game development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

4  
DirectX is a suite of game/multimedia related APIs. Direct3D is a subset thereof. Direct3D and OpenGL are analogous (both being 3D graphics APIs) but DirectX and OpenGL are not. –  Josh Petrie Oct 11 '11 at 18:51
    
ahhhh. I thought so. –  Dan the Man Oct 11 '11 at 19:01
    
This question appears to be off-topic because it is about specific features of specific software, and lacks an explanation of the problem needing to be solved. –  Josh Petrie Nov 11 at 17:14

2 Answers 2

up vote 5 down vote accepted

Unity supports several renderers for its various platforms, Direct3D and OpenGL among them. You can find references to this fact in the release notes, for example, and in this documentation explaining some differences between renderer implementations that users should be aware of.

It appears that by default, Unity will use D3D on Windows. You can force it to use an OpenGL rendering path, apparently, via a command-line argument (although that thread is quite old). Configuring the rendering path in your game settings appears to be more about deferred versus forward renderers, and not the underlying API used.

share|improve this answer
    
As Aras posted in that thread you linked to, Unity uses D3D on Windows because OpenGL drivers on Windows are horrible. The Unity guys pride themselves on being "write once run anywhere", and supporting the crappier hardware on OpenGL was significantly less stable than using D3D. –  Tetrad Oct 11 '11 at 20:47
    
Actually, according to the documentation on command line parameters here: unity3d.com/support/documentation/Manual/…, it does use OpenGL on Windows if DX9.0c (or newer, presumably) isn't found. –  Tetrad Oct 11 '11 at 20:49

As Josh said and if you also look under the Major Features in here, you will see that it uses both, I am not positive, but I believe it is so you can build your game in a variety of platforms.

share|improve this answer

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