DirectX or OpenGL [closed]

2019-03-10 05:09发布

If you were writing the next 3d graphics intensive application in C# (like a 3d modelling and animation software), which one would be a better choice?

If we consider C# as platform independent, then OpenGL seems tempting, but what about the performance, etc?

Since the used language is C#, the performance is pretty crucial to consider.

Edit: You can also consider SlimDX and TAO, OpenTK, csGL, etc too.

15条回答
姐就是有狂的资本
2楼-- · 2019-03-10 05:29

OpenGL lagged in the past in relation to performance features, but things got fixed eventually. To give an example, consider bindable uniforms, where Direct3D had a faster mechanism before OpenGL acquired a similar one. Apart from supporting different feature-sets at times, there's no difference.

So unless you intend on working with the very newest GPU features, I'd advise you go with OpenGL. It's safe to say there aren't many areas where OpenGL lags in performance-related features.

By the way, C# and .NET are platform-independent only if you take certain precautions.

查看更多
做自己的国王
3楼-- · 2019-03-10 05:30

There is a managed API for DirectX, which gives you access to the DirectX API as "native" C# objects. That's a huge leg-up over OpenGL.

查看更多
可以哭但决不认输i
4楼-- · 2019-03-10 05:33

It depends what platform you intend to target.

If you only need to target windows use XNA

For cross-platform work, maybe someone else out there has done some work using mono with openGL - I'm assuming you are intending to make graphics software rather than a game, so having somekind of framework like winForms would be very helpful for all your UI controls.

查看更多
登录 后发表回答