The relationship between DirectX and OpenGL with UE4, U3D, and Webgl (ThreeJS)

1, DirectX and OpenGL are graphics rendering APIs that encapsulate the hardware layer. Through this API, the application layer can control the GPU to perform graphics rendering, eliminating the need for the caller to worry about how the CPU calls the GPU, how the GPU allocates memory, how to asynchronously process code, and so on
DirectX was developed by Microsoft and can only run on Windows. DirectX is not just a graphics API, it is a widely used API developed by Microsoft. It includes multiple components such as Direct Graphics (Direct 3D+ Direct Draw), Direct Input, Direct Play, Direct Sound, Direct Show, Direct Setup, Direct Media Objects, etc. It provides a complete multimedia interface solution. Its excellent performance in 3D graphics only makes its other aspects appear dull.

OpenGL is an international standard that can cross platforms. The full English name of OpenGL is "Open Graphics Library", as the name suggests, OpenGL is an "open graphical programming interface". The so-called cross platform (a set of code can run on different platforms) of OpenGL is to write a set of code on different operating systems, but the interface functions exposed to developers are consistent. Users do not need to pay attention to underlying differences in the operating system
2, With DirectX and OpenGL, users can develop their own applications, as well as games and Meitu software. But it basically needs to start from 0. At this point, the need for customized applications arises. Game engines are one of them
A game engine is essentially a software, a software for making game applications. It can output programs that the target operating system can run. UE3 and UE4 are game engines, which not only combine DirectX and OpenGL (which graphics API can be selected during engine switching) for graphics rendering, but also include other elements required for the game, including: physics engine, voice module, network communication, input/output module, and so on. Compared to DirectX and OpenGL, it is much more complex and massive.

3, WebGL is a Javascript API based on OpenGL ES 2.0. Dealing with DOM through HTML5's Canvas. Therefore, just like OpenGL ES 2.0, GLSL is used as the Shading Language (a C-Like vertex computation and shading language that is cached and compiled to the GPU for execution). OpenGL ES is a slim version of OpenGL developed for mobile platforms, which has removed many unnecessary functions and lowered hardware configuration requirements.

Three.js is an open-source webGL framework that encapsulates commonly used objects in 3D graphics programming in an easy-to-use, simple, and intuitive way. Many advanced techniques of graphics engines were used in development to improve performance. Built in with many commonly used objects and easy-to-use tools, it has powerful functions. Three.js is a pure rendering engine, and the code is easy to read, making it an easy platform for learning WebGL, 3D graphics, and 3D mathematical applications. It can also be used for small and medium-sized web end 3D projects with heavy rendering