Introduction
In the past, software development lacked standards, and one code only corresponded to one hardware and one system, resulting in a very cumbersome development process. At this point, an intermediate layer is needed to communicate between different software and hardware, which is the API (API is a standard set of functions that perform a set of related operations, and graphical API is a graphics library for GPUs). Programs can be built directly through APIs without the need to access deeper things. The significance of APIs lies in simplifying programming operations OpenGL and DirectX are graphical APIs that bridge the communication between upper level applications and lower level GPUs. An application sends rendering commands to these interfaces, and these interfaces in turn send rendering commands to the graphics card drivers, who are the characters who truly know how to communicate with the GPU. It is the graphics card driver who translates OpenGL or DirectX function calls into languages that the GPU can understand, and they are also responsible for converting texture and other data into formats supported by the GPU Nowadays, graphics cards generally support both OpenGL and DirectX simultaneously.
.
II: Differences
-DirectX can only be applied to the Windows platform, while OpenGL is a hardware independent software interface that can cross platforms
-OpenGL has stronger stability than DirectX
-OpenGL only has graphics features, while DirectX is mainly designed for game development. Therefore, in addition to graphics features, DirectX also has functions such as networking, sound effects, and input
.