OpenGL still better than Direct3D for non-games? [

2019-03-09 18:47发布

The standard model has been that OpenGL is for professional apps (CAD) and Direct3D is for games.

With the debacle of openGL 3.0, is openGl still the natural choice for technical 3D apps (cad/GIS)?
Are there scenegraph libraries for Direct3D?

(Of course Direct3D is windows only.)

8条回答
乱世女痞
2楼-- · 2019-03-09 19:08

This doesn't directly answer your question (sorry), but I was one of the original guys working on Direct3D and hehe:

Are there scenegraph libraries for Direct3D?

Direct3D (nee Reality Lab) used to just be a scenegraph library :-)

Shame that Direct3D Retained Mode isn't shipped anymore...

查看更多
做个烂人
3楼-- · 2019-03-09 19:09

D3D makes you pay the Microsoft "strategy tax." That is, D3D serves two masters. One is giving you features and performance. The other is to ensure lock-in to other MS products and the Windows platform generally. This has some consequences for you:

  1. A D3D app won't run on anything but Windows (including Xbox). Maybe you don't think that's important now. But if, down the road, you want to run on Mac, Linux, PS3, future consoles, etc., you may be glad you chose the platform-independent choice.

  2. MS can make some arbitrary decisions. Will the next version of D3D only run on an OS that requires new hardware, is expensive, and lots of people don't want to upgrade to? Will they make some other future decision you don't agree with?

  3. Historically, OpenGL has led D3D in quick exposure of new HW features. This is because there's a mechanism in the standard for vendors to add their own extensions, and for those extensions to eventually be folded into the main spec. D3D is whatever MS wants it to be, with input from vendors to be sure, but MS gets veto power. You could easily be in a situation like with Vista, where MS decided not to expose new HW features to the old DX, and only make the new DX available on Vista. This was quite a headache for game developers.

Now then, this is the flavor of reasons why a "professional app" (CAD, animation, scientific visualization, GIS, etc.) would favor OGL -- apps like this want to be stable for many years, need ongoing maintenance and improvement, and want to run on many platforms. This is in contrast to games, which quite frequently are only on one platform, will be released but generally not "maintained" (there likely won't be a 2.0, an update for another OS three years hence, don't need to support older HW, etc.). Games want maximum performance and only need to work for a short time window and on a fixed number of platforms. If they need to target Windows anyway and D3D is a little faster, that may be the right choice since the negative D3D consequences won't hurt them like it would for a CAD app, say.

查看更多
唯我独甜
4楼-- · 2019-03-09 19:18

Perhaps you should try an abstraction layer such as OGRE, which lets you switch between DirectX and OpenGL without having to rewrite anything? It also adds a lot of functionality, and isn't game-oriented, but pretty generic.

查看更多
狗以群分
5楼-- · 2019-03-09 19:19

The answer everyone wants to believe is YES but the real answer is, it depends.

About 50% of all hardware out there will not run OpenGL to any reasonable level. To see an example of this read the FAQ for Google Sketchup which uses OpenGL

SketchUp's performance relies heavily the graphics card driver and it's ability to support OpenGL 1.5 or higher. Historically, people have seen problems with ATI Radeon cards and Intel based cards with SketchUp. We don't recommend using these graphics cards with SketchUp at this time. (Hardware ans software requirements for Google Sketchup

So, If you're writing a CAD app and you don't mind telling your customers, "you must have an OpenGL complient video card" then the answer is yes.

If instead you are creating an end-user app (Google Earth for example) then the sad answer is you'll have to write both a D3D and GL version of your app if you want to reach the entire market.

查看更多
我只想做你的唯一
6楼-- · 2019-03-09 19:20

To me, speaking as a graphics programmer in a large CAD company, there are currently three things that retain OpenGL of beeing dropped in favor of Direct3D (10/11) for existing CAD/DCC applications:

  1. Legacy. Most of CAD softwares are more or less hardly tight to OpenGL concepts. Rewriting everything around D3D philosophy is not always manageable (technicaly speaking and depending on the ability/willingness of the company to throw resources at it).

    Secondly it could have negative impacts if something goes wrong (functionnality speaking and/or performance wise) and company would just not take the risk of delaying a major release because of an API and architecture switch.

  2. Peoples. Peoples in those old-boy industries are fairly conservative. They prefer spending money/time on dealing with IHVs regarding all OpenGL driver issues they could have or simply won't recommend using graphics from a specific IHV (e.g. Intel or ATI).

    Plus, I believe that the automotive/aerospace industry customers like Boeing, Airbus, TMC, BMW, etc don't care that much of having Quadros only workstation. Hardware is still cheap in regard to software licence prices.

  3. Future trends. With future generation of processors like Llano, Larrabee, Fermi and products that will follow, it's definitely worth to invest R&D budgets on how to program and develop new languages / apis / frameworks for those future hardwares (in term of graphics as well as non-graphics tasks).

    CAD industry has huge cycles and won't move if not for a truly disruptive technology. So D3D might just come a bit late for big CAD players (except Autodesk of course which is a particular case).

查看更多
叛逆
7楼-- · 2019-03-09 19:31

Direct3D is only available on Windows and XBox. If you plan on targeting Unix or Mac, in addition to Windows, OpenGL is a good choice.

查看更多
登录 后发表回答