-
Notifications
You must be signed in to change notification settings - Fork 183
Description
In desktop GL, there's glPushDebugGroup and glPopDebugGroup which work similar to window.spector.setMarker and window.spector.clearMarker.
However, the GL way of doing it is better, because it's structured. It's possible to contain one group in another one.
Most debugging tools will visualize these groups with foldable-log entries.
This makes it possible to get a high-level overview of each rendering step in a folded/collapsed list. Users can unfold/uncollapse individual entries, and do this recursively until they find the draw calls they care about.
With projects like https://github.com/maplibre/maplibre-gl-js (map rendering) there can be hundreds of layers (water, grass, roads, ..) on a map. With groups, one could collapse these layers. Within each layers, one could have other high-level entries like "data-upload" and "rendering".
For the desktop variant of mapbox (which maplibre is based on), this is already done with debug-groups.
In GPU or API emulators it's possible to represent guest-system graphics actions by a handful of host-system API calls. So grouping these together can provide a guest-API view. (Example: When porting an application, creating a group for Direct3D draw calls, which internally call OpenGL backend functions - in collapsed view, only the Direct3D API would be shown).
However, there are probably many other applications for this.
This would also be necessary for #170.