How google/angle works
ANGLE is a graphics translation layer: applications submit OpenGL ES (and EGL) calls, ANGLE manages graphics state, translates shaders, and dispatches work to a platform-supported renderer. The README also documents an experimental OpenCL runtime and standalone shader translation/validation. The graph preserves those branches and the major renderer choices. Some renderer internals are represented by their existing source directories because they were not sampled; edges among those components reflect README-level capabilities, not inspected call sites.
Main entry points: Context.h GL Context · ShaderLang.cpp Shader Compiler · libOpenCL OpenCL API · libGLESv2 GLES Entry Points
Components 23
Graphics API
- GLES Entry Points
src/libGLESv2 - EGL Runtime
src/libEGL
Shader Translation
- Shader Compiler
src/compiler/translator/ShaderLang.cpp - Shader Preprocessor
src/compiler/preprocessor/Preprocessor.cpp - Shader IR
src/compiler/translator/IntermNode.h - GLSL Translators
src/compiler/translator/glsl - HLSL Translator
src/compiler/translator/hlsl - SPIR-V Translator
src/compiler/translator/spirv - Metal Translator
src/compiler/translator/msl/TranslatorMSL.cpp - WGSL Rewriting
src/compiler/translator/wgsl/RewritePipelineVariables.cpp
Graphics Runtime
- GL Context
src/libANGLE/Context.h - GL Resource State
src/libANGLE - Pixel Local Storage
src/libANGLE/PixelLocalStorage.cpp
Backing Renderers
- Direct3D 11
src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp - Desktop GL
src/libANGLE/renderer/gl - Vulkan
src/libANGLE/renderer/vulkan - Metal
src/libANGLE/renderer/metal - WebGPU
src/libANGLE/renderer/wgpu/wgpu_pipeline_state.cpp
OpenCL Runtime
- OpenCL API
src/libOpenCL - OpenCL Passthrough
src/libOpenCL
Other components
- Graphics Application
- Native OpenCL Drivers
- Shader Tool User
Connections 23
- Graphics Application → GLES Entry Points: calls
- Graphics Application → EGL Runtime: uses
- GLES Entry Points → GL Context: dispatches
- EGL Runtime → GL Context: creates contexts
- GL Context → GL Resource State: manages
src/libANGLE/Context.h - GL Context → Shader Compiler: compiles shaders
- Shader Compiler → Shader Preprocessor: preprocesses
- Shader Compiler → Shader IR: builds IR
- Shader Compiler → GLSL Translators: translates to GLSL
- Shader Compiler → HLSL Translator: translates to HLSL
- Shader Compiler → SPIR-V Translator: translates to SPIR-V
- Shader Compiler → Metal Translator: translates to Metal
- Shader Compiler → WGSL Rewriting: translates to WGSL
- GL Context → Direct3D 11: dispatches rendering
src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp - GL Context → Desktop GL: dispatches rendering
- GL Context → Vulkan: dispatches rendering
- GL Context → Metal: dispatches rendering
- GL Context → WebGPU: dispatches rendering
- GL Context → Pixel Local Storage: manages storage
src/libANGLE/PixelLocalStorage.cpp - Shader Tool User → Shader Compiler: submits shaders
- OpenCL API → OpenCL Passthrough: forwards calls
- OpenCL Passthrough → Native OpenCL Drivers: forwards to drivers
- OpenCL API → Vulkan: offers platform