11
\$\begingroup\$

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

\$\endgroup\$
  • 6
    \$\begingroup\$ 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. \$\endgroup\$ – user1430 Oct 11 '11 at 18:51
  • \$\begingroup\$ ahhhh. I thought so. \$\endgroup\$ – Daniel says Reinstate Monica Oct 11 '11 at 19:01
  • \$\begingroup\$ 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. \$\endgroup\$ – user1430 Nov 11 '14 at 17:14
10
\$\begingroup\$

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.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ 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. \$\endgroup\$ – Tetrad Oct 11 '11 at 20:47
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – Tetrad Oct 11 '11 at 20:49
1
\$\begingroup\$

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.

| improve this answer | |
\$\endgroup\$

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