(Image Source: www.cnblogs.com)
Source:OpenGL 3 & DirectX 11: The war is over
CurrentlyDirectXAndOpenGLIn an age that has been quite popular, we gradually seem to have forgotten the grievances of the two. On the famous hardware websiteTom's HardwareIn this column, the author leads us to review the ups and downs in the "Drawing API war" and the future prospects of OpenGL 3 and DirectX 11. It is a good article worth reading carefully.
「 DirectX is the most kill! Long live the very evil Microsoft empire !」
「 Do you want to cross-platform? OpenGL is the only bright path !」
「 I am a beginner. Should I select DirectX or OpenGL ?」
「 I want to make a great and super-fun game. Is it better to use DirectX or OpenGL ?」
As a game programming designer, if you have the habit of regularly browsing major program forums outside China, you should be very kind and familiar with the above issues, and may be somewhat disgusted? In the discussion area related to game programming「 Comparison of DirectX and OpenGL 」Does not belong. DirectX and OpenGL both have their own loyal supporter camps. As long as they raise issues similar to the above descriptions on the Internet, they will often attract fierce confrontation and debate from both sides; if you accidentally touch the "back-to-scale" of some senior program designers, it will be even more difficult to fight.
In the past few years, we have witnessed the explosive growth of the consumer 3D display card market. From the "3D accelerator card" that only hard-school players used to make a lot of money to buy, it has almost become a standard "3D display card 」, computer graphics hardware not only successfully entered the general consumer market, but also achieved a revolutionary breakthrough in its performance. At present, the number of GPUs has even exceeded the CPU. Today,DirectX and OpenGL play a role in the computer graphics and gaming industry. Are they in the form of competition, or are they already winning or losing?Let me explain it from the beginning.
Microsoft (MS for short) andSilicon Graphics(SGI for short) the graphic API war between companies has lasted for ten years. At the beginning of DirectX, MS with its huge enterprise resources and Windows operating system market success rate, is preparing to roll out their own Design of the Drawing API standards. In contrast, although the SGI resources are relatively weak, OpenGL, which has been around for years, has already been the king of the Computer Graphics Industry and cannot be shaken. At the same time,OpenGL was also endorsed by John Carmack, the strongest and powerful ally.. Since it was developed using OpenGL at the timeQuake EngineThe amazing graphic effects have been achieved, so that all the manufacturers of graphics display cards must provide complete drivers to support OpenGL standards to meet the expectations of game developers and gamers for graphics card hardware.
SGI OpenGL was the leader in the professional drawing market at that time, ghost has a great advantage, while at the same time MS can only everything from scratch. To develop an easy-to-use and powerful drawing API, the learning curve is quite grim. In earlier DirectX versions, many program designers cannot adapt to the complex concept that is totally different from OpenGL. Therefore, many people are dismissive about DirectX and are not optimistic about its future development. But the MS does not give up, with each release of the new version, DirectX is gradually keep up with the pace of OpenGL.
At the beginning of the war, OpenGL had significant advantages. HoweverThe turning point of the entire battle took place in DirectX 8 released by MS in 2001. This is the first time that DirectX APIs no longer just stop copying SGI specification standards; in this new version of DirectX, MS introduces an extremely important innovation and change for the entire computer graphics industry: vertex shader and pixel shader. The birth of vertex and pixel paintors opened up an unprecedented and shining Avenue of Stars for drawing program developers.
In contrast, SGI's main source of revenue was its very expensive 3D graphics workstation, which failed to anticipate the explosive explosion of demand in the 3D graphics display card market, the two emerging display card manufacturers, ATI and NVIDIA, have been able to bring graphic display cards to the gaming player market at a very low price. On the other hand, the development of OpenGL specifications and standards is also affected by the conflict of interests between software and hardware manufacturers, and the consensus cannot be reached. On the MS side, however, it is just working with ATI and NVIDIA to develop DirectX API specifications, and has the final key discretion, so it can be quite smooth and rapid continuous development.
In this case,After DirectX 9 was launched, it was even more successful to win a decisive victory.. As a result, many software and game developers decided to start using DirectX or provide support for both. Only John Carmack and cross-platform developers are loyal to OpenGL, however, their camp is much weaker than before. Of course, the OpenGL camp still has an opportunity to reverse its fate. So two years ago, the OpenGL ARB organization finally delivered the OpenGL development rightKhronosThe Group has put all hopes on them. After two years of waiting, khronos finally published OpenGL 3 in the Siggraph seminar in August this year. All the supporters of OpenGL camp do not expect to achieve success. However, it was not as smooth as originally planned.
Pulling back the time series in 2002, OpenGL is gradually losing its leading position in the computer graphics field.MS DirectX 9 proposed the new shader plotting function and higher order coloring language (HLSL), but OpenGL camp can not get comparable functions.After the advent of the shader drawing architecture, it was difficult for the display card hardware to follow the traditional drawing pipeline architecture for manufacturing, so in order to make up for the existing OpenGL deficiencies, various display card manufacturers began to expand their original OpenGL specifications and customize their own exclusive extended drawing APIs.
While the OpenGL camp is in chaos,3 dlabsThis company understands that OpenGL is in urgent need of rapid and thorough changes to keep up with the rapid development of display card hardware. Therefore, it is imperative to propose an OpenGL reorganization project with many major reform projects. First, they added glsl, a high-order coloring language for OpenGL, and then, in order to make OpenGL good performance, they had to make comprehensive modifications to the API; in the Core Specification of OpenGL 2.0 pure, they plan to delete outdated and redundant feature features, leaving only the features that best fit the current mainstream hardware architecture, so that developers can slowly move from the old OpenGL 1.x version, transfer to the new OpenGL 2.0 version.
Unfortunately, this comprehensive improvement plan was rejected after a lengthy discussion by OpenGL Arb.In the final release of OpenGL 2.0, we only added support for glsl.The other functions proposed by 3 dlabs all pass with the wind, resulting that OpenGL 2.0 is still far behind the functions provided by DirectX. In 2005, OpenGL finally caught up with the API functions that DirectX released three years ago. At this time, various display card manufacturers and software developers agree that the situation cannot continue to develop like this, otherwise OpenGL will gradually lose its position and be forgotten. Finally, OpenGL ARB handed over the baton to the khronos group in 2006.
Khronos said with the high efficiency and responsibility attitude of managing OpenGL ES in the past. After taking over OpenGL development, they quickly established an external communication channel, we also discuss the future development of OpenGL with multiple vendors, and finally propose two items.Milestones of the OpenGL development project: longs peak and Mount Evans. First, in the first Development Milestone longs peak, they intend to delete outdated APIs so that OpenGL can be concentrated in a group of advanced feature groups, it also provides the same level of functionality as Shader Model 2, while the second milestone, Mount Evans, is expected to be able to join a brand new API and provide the same level of functionality as Shader Model 4.
The schedule was very urgent, and there were a lot of projects to be completed. The initial development status was still everything went well. I didn't expect it to start from the end of 2007, khronos no longer publishes any development progress information about the new version of OpenGL. Suddenly, the open and honest communication turned into a completely closed attitude. During the Siggraph seminar in August this year, OpenGL 3 started to be called by thousands of workers. However, after a pleasant surprise, we were disappointed, dissatisfied, and angry, and came around like a flood in the discussion area.
But while some people were expecting a pleasant surprise, khronos had a serious disconfigursionment in store for fans of OpenGL.
These strong negative responses are not only because OpenGL 3 has been delayed for nearly a year before being released, at the same time, most of the new features promised in longs peak are completely abandoned. View Final published results,OpenGL 3 looks like OpenGL 2.2.It is just an "incremental update", and the API has not actually changed. The new functions provided by OpenGL 3 are also very similar to DirectX 10.
According to Carmack,The main reason why OpenGL 3 standards fail to meet expectations is that some CAD software developers are not satisfied with the specifications specified in longs peak.. These software vendors are afraid that compatibility issues will invalidate some of the older features of their applications. The NVIDIA company lichtenbelt, who is deeply involved in R & D, also said: "We have encountered inconsistencies in the topics on which features should be removed, mainly because of different market demands.We find that we cannot make an API that meets everyone's needs.」
Let's look at the DirectX camp on the other side. In 2006 the release of DirectX 10, the MS of DirectX overall made the most complete change in history. In recent years, the traditional API graphics architecture is almost unable to keep up with the development of display card hardware. Therefore, the ambitious goal of DirectX 10 is to provide a solid foundation for the future hardware architecture. However, DirectX 10 has not gained the favor and attention of game players and developers as expected.
Gaming players may not experience significant changes even if DirectX 10 is used. Worse, the new API is only written for systems above Vista, just find a very good reason for war for users who are hostile to MS. For game developers, when Windows XP is still the vast majority of consumer markets, DirectX 10 is tied to the Vista operating system, not only is the conversion cost extremely high, but it cannot play a significant role in the market. Therefore, most game projects still choose to stick to the traditional DirectX 9 standard.
(Image Source: www.socgame.com.tw)
In DirectX 11, which has just revealed its preliminary information recently, it released a number of new features worth the hope of game developers. DirectX 11 is based on version 10. It can also be called an enhanced version update. After DirectX 11 was officially asked, many developers should choose to skip DirectX 10, use DirectX 11 to develop the latest game. And the best thing is,DirectX 11 is not only compatible with the display card of DirectX 10, but also can be executed on Windows 7 and Vista!
Among many new features of DirectX 11, I personally think the most important thing isSupport for multi-execution graphics. Furthermore, compared with NVIDIA's cuda, the dedicated GPU development language, the compute shader of DirectX 11 provides support for display cards of ATI and NVIDIA at the same time, even the Intel Larrabee display hardware in the future will be better integrated with DirectX functions. In addition, imports in the tessellation stage, improvements to the texture compression effect, and object-oriented Shader Model 5 are also very attractive features for computer graphics and game development.
Many people are disappointed with OpenGL, not only the API's ability, but also the process of being processed. In OpenGL 3, only barely followed the pace of DirectX 10, and in almost the same time, MS has released the next generation of DirectX 11 version details. Although compared with DirectX 10, the latest DirectX 11 does not have any revolutionary innovation, but since the release of DirectX 10, MS has been two years of difficult situation, so now MS can be on the basis of a sound, recovery at that time spent a huge effort to re-build the API effort.
Under the title of the original article「 The war is over 」Has clearly expressed my thoughts on the battle between DirectX and OpenGL. However, at the end of the article, even if the possibility of the future is quite unpredictable, the author still hopes to prove that his conclusion is wrong in the subsequent OpenGL 3 updates. In my own opinion, OpenGL is still the only choice for cross-platform graphics applications. I don't want OpenGL to go down from the decline, and it will turn into DirectX's dominant position. Only positive competitive pressures can accelerate the development of drawing APIs and graphic display hardware.
After understanding the historical origins and the ins and outs of the competition between DirectX and OpenGL, some readers may still want to ask: "should I choose to learn DirectX or OpenGL ?」 For beginners who want to enter the game programming field,My suggestion is: you need to learn both.DirectX and OpenGL have different design concepts and implementation skills, but also have their own unique advantages and weaknesses. In the game industry, both parties have a wide range of users, they are not especially biased towards one party, so they cannot be left alone.
If you have to pick an entry from both, I would suggestLearning computer graphics theory and implementation technology from OpenGL. Beginners who are learning DirectX are often confused by the establishment of Windows programs and the architecture of COM components. Instead, they will learn the focus of computer graphics programming. If OpenGL is used, Glut or other auxiliary libraries can be used to greatly simplify the establishment of Windows programs related to the platform, enables learners to focus on computer graphics theory and programming technology. Of course, if you are quite familiar with Windows Programming before entering the computer graphics field, you can also choose DirectX as the starting point.
After learning DirectX and OpenGL, I can use them as two tools in my toolbox: When I want to learn the latest shader programming, when the performance of the display card reaches its limit, I will use DirectX, and when I have a program concept that wants to quickly complete the prototype test, I will wave OpenGL. Whether it's DirectX or OpenGL, do you have the freedom to come and go?