Translated from: https://www.extremetech.com/computing/54604-top-tip-what-are-opengl-direct3d-directx-etc.
First of all, a clarification: DX includes D3D, which is the main graphics processing part of DX, while OpenGl is an API in some ways.
A game developer, or any graphics programmer, can choose whether to use DX or OpenGl APIs. If they want to have complete control over the internal implementation, they can write the necessary modules themselves to use.
In the final version after patch v226f, Unreal Games allows your game to choose its own API, some of which are outdated or integrated into DX or OpenGl.
#1. DirectX (including Direct3D) and OpenGl are both APIs
API; Application Program Interface.
The API allows developers (such as game developers or video CAD developers) to use predefined function calls to make developing games or using CAD more convenient. DX and OpenGL define multiple ways to render images, and they provide intermediate layers to control hardware and software. These predefined control layers simplify video software development such as gaming.
When using APIs with specific features, developers will find it easier and faster to develop and write code, otherwise they will have to write all the graphics rendering themselves.
#By default, Windows systems above Win95 already include all earlier versions of APIs to some extent
So they don't need to install earlier versions, but they need to be updated in real-time.
#Here are the differences between DX and OpenGL that we must know
OpenGl is simply a graphics rendering API, so it can only process images.
DirectX includes graphics (Direct3D), sound, and even network APIs, all in one package.
#Background of 4 DX and OpenGl
D3D (now included in DX) was invented by Microsoft to counter OpenGL. Microsoft's invention of D3D will be simpler, and Microsoft hopes that D3D will be more powerful than OpenGL in the future and replace it. (Translator's note: The API source code of D3D is really much simpler than OpenGL.).
OpenGL is a language invented by SGI in 1980. Initially, SGI only used its powerful graphics rendering capabilities internally. Gradually, they realized that if they wanted it to become an industry standard, they must open source and allow other companies to define specifications together.
Through the above few points, you should have a general understanding of the differences between them.