3 ms·
Another cool thing he mentions is that it does something sort of like React's diffing. When you tell Glium, "make me these three polygons, add a light source,
by archimedespi 11y ago
Another cool thing he mentions is that it does something sort of like React's diffing.
When you tell Glium, "make me these three polygons, add a light source, apply a transform matrix", it optimizes the number of OpenGL calls it needs to do, and the kinds thereof, and puts them in the right order to run most efficiently.
Like React, it optimizes state changes required for speed to get a view from one state to another.
- mastax 11y agoThe fact that Glium needs to do this demonstrates how flawed the state-wrangling in OpenGL has become. Vulkan can't come fast enough.
- archimedespi 11y agoA couple years ago I was trying to teach myself OpenGL, and I failed miserably for that exact reason, plus bad function naming conventions. The weirdest thing about OpenGL is that you sometimes have to run one function before another function, for no good reason, but it gives you a giant performance boost.