4 ms·
Can you explain why you think it's "wrong"?
by junon 3y ago
Can you explain why you think it's "wrong"?
- flohofwoe 3y agoThe GL programming model defines a highly granular and highly dynamic state machine of dozens (hundreds?) of small knobs and sliders that needs to be mapped to an underlying hardware which looks very different by now. This results in small state changes potentially causing large and unpredictable 'recompiles' of the internal 'driver state' at random points (e.g. calling one of the blend state functions - which should be a very cheap operation - might trigger expensive shader recompiles in some random GL call down the line, but if and when this exactly happens depends on the specific GL implementation). That's one important reason why modern 3D APIs prefer to group state into immutable state-group objects (even if those modern 3D-APIs also don't perfectly map the underlying hardware).