Parallel Computing - CUDA Development - Differences between OpenCL, OpenGL, and DirectX

  • Tags : directx
  • time :
What is OpenCL?

OpenCL, also known as Open Computing Language, is the first open and free standard for parallel programming for heterogeneous systems. It is also a unified programming environment that facilitates software developers to write efficient and lightweight code for high-performance computing servers, desktop computing systems, and handheld devices. It is widely applicable to multi-core processors (CPUs), graphics processors (GPUs), and more The Cell type architecture and other parallel processors such as digital signal processors (DSPs) have broad development prospects in various fields such as gaming, entertainment, scientific research, and healthcare
OpenCL 1.0 mainly consists of a parallel computing API and a programming language for such computing, in addition to specifically defining:

1. C99 programming language parallel extension subset;

2. Coordinate data and task based parallel computing API suitable for various types of heterogeneous processors;

3. Numerical conditions based on IEEE 754 standard;

4. Efficient interoperability with OpenGL, OpenGL ES, and other graphics APIs.

What is OpenGL? .

OpenGL ™ It is the most widely accepted 2D/3D graphics API in the industry, and since its inception, it has spawned thousands of excellent applications on various computer platforms and devices. OpenGL ™ It is independent of the Windows operating system or other operating systems and is also network transparent. In industries including CAD, content creation, energy, entertainment, game development, manufacturing, pharmaceuticals, and virtual reality, OpenGL ™ Assist programmers in developing high-performance and impactful graphics processing software for hardware devices such as PCs, workstations, and supercomputers.

OpenGL (Fully Written Open Graphics Library) is a specification that defines a cross programming language, cross platform programming interface for 3D images (2D can also be used). OpenGL is a professional graphics programming interface that is a powerful and easily accessible underlying graphics library. The predecessor of OpenGL was the IRIS GL developed by SGI for its graphics workstation. IRIS GL is an industry standard 3D graphics software interface that, although powerful, has poor portability. Therefore, SGI developed OpenGL based on IRIS GL. The full English name of OpenGL is "Open Graphics Library", as the name suggests, OpenGL is an "open graphical programming interface". Although DirectX leads the household market comprehensively, OpenGL is an irreplaceable protagonist in the professional high-end graphics field.

Open GL remains the only API that can replace Microsoft's complete control over 3D graphics technology. It still has some vitality, but Silicon Graphics no longer promotes Open GL in any way that displeases Microsoft, so it carries a high risk. Game developers are a group with independent thinking, and many important developers are still using Open GL. Therefore, hardware developers are trying to strengthen their support for it. Direct3D currently cannot support high-end graphics devices and professional applications; Open GL dominates in these fields. Finally, the open source community (especially the Mesa project) has been committed to providing Open GL support for any type of computer, whether or not they use Microsoft's operating system
OpenGL 3.0 version was officially announced in 2008 this year. And with the support of NV, its official website provides SDK downloads for N cards.

What is DirectX? .

DirectX is an application programming interface (API) that enables Windows based games or multimedia programs to achieve higher execution efficiency, enhance 3D graphics and sound effects, and provide designers with a common hardware driver standard, eliminating the need for game developers to write different drivers for each brand of hardware and reducing the complexity of user installation and hardware setup. Is it a bit unclear to say this? Literally, Direct means direct, while the following X represents many meanings. From this point, we can see that the emergence of DirectX is to provide direct services for many software.

DirectX is composed of many APIs, which can be classified into four major parts according to their properties: display part, sound part, input part, and network part.

The display part plays a crucial role in graphics processing, divided into DirectDraw (DDraw) and Direct3D (D3D), with the former mainly responsible for 2D image acceleration. It includes many aspects: we use DDraw to play MPG, DVD movies, watch pictures, play small games, and so on. You can understand it as all the underlined parts using DDraw. The latter is mainly responsible for displaying 3D effects, such as scenes and characters in CS, characters in FIFA, and so on, all using DirectX's Direct3D.

The story that must be told between OpenCL, OpenGL, and DirectX .

The industry's support for Apple's OpenCL will become an important factor in its development. As early as the mid-1990s, Microsoft worked hard to prevent OpenGL from becoming the industry standard in order to promote its own DirectX graphics card software and gaming tools. Microsoft's Direct X's initial strategy was to drive DOS game developers to switch to Windows, and since then it has been bundled under Windows as a PC gaming service, so it only supports Windows.

The discontinuation of the new version of DirectX has also driven developers to switch to the latest version of Windows. For example, the latest version of DirectX 10 has brought many Vista exclusive games, thereby driving Vista's sales. However, it has not achieved the expected results because Vista's speed has hindered the market for DirectX10 games, and developers can only turn their goals back to XP.

OpenGL and Apple .

OpenGL's predecessor was the IRIS G developed by high-end graphics workstation manufacturer SGI in the 1980s, which became an open source standard in the early 1990s. At that time, Microsoft released Direct3D in its Windows 95 as a competitor to OpenGL. In the late 1990s, Microsoft collaborated with SGI to develop the Fahrenheit project, attempting to combine the two but without success. Afterwards, Microsoft continued to develop DirectX and collaborated with GPU manufacturers, leaving OpenGL to continue its development.

After OpenGL, it almost gradually disappeared until the late 1990s when Apple abandoned its own QuickDraw 3D and made OpenGL the official 3D library for Mac OS X. Apple's system has brought many supporters to OpenGL programs. Afterwards, OpenGL was officially adopted by Linux, and now mainstream gaming platforms, including PSP, PS3, and Wii, all support this technology.

However, Microsoft's Xbox 360 is an exception as it uses its own DirectX graphics library and excludes OpenGL. Nowadays, OpenGL is more competitive for DirectX than before. Microsoft plans to add OpenCL like technology to DirectX 11 in Windows 7 to enable GPGPU computing. But Apple's OpenCL can work more closely with OpenGL code, bringing wider support. Apple also makes OpenCL a free, open-source standard that allows anyone to participate in the platform.

The similarity in design between OpenGL and OpenCL makes it easier for developers to develop. For example, performing data virtualization calculations in OpenCL can render the same objects in graphics on OpenGL. At the same time, graphics rendering in OpenGL can be processed and converted in OpenCL.

OpenCL has received support from GPU manufacturers NVIDIA and AMD, as well as platforms from Apple, Sony, and Nintendo. It also supports Linux and Windows, and developers from any company can participate in the development of this technology.