
146 9. WebGL Engine Design in Babylon.js
• Each group is rendered using associated engine states, such as alpha blending.
Torender an individual mesh, the following process is executed:
• Mesh’s material is activated: Inner shader, samplers, and uniforms are trans-
mitted to WebGL.
• Mesh’s index and vertex buers are sent to WebGL.
• Draw command is executed (gl.drawElements).
Now that we have a clearer view over the engine, let’s discuss the internal architecture
and optimizations.*
9.3 Engine Centralized Access
During the rendering process, everything related to WebGL is handled by the Engine
object. It was architected this way to centra