Hacker News new | ask | show | jobs
by Tehdasi 1405 days ago
Tangentially related, but I remember reading years ago a piece from a graphics driver developer (nvidia maybe?) that one of the reasons why the opengl driver was slower than their directx driver (I believe) was that the structure of OpenGL was such that you had to put a massive switch in the code which really hurt performance.
1 comments

Very unlikely that an actual switch statement was the problem (if that actually exists, and wasn't just 'figure of speech'). OpenGL state is a huge collection of tiny knobs and toggles ('switches' if you like) and each state change may in turn influence other state, while D3D (since D3D10 at least) groups the same state into a small number of immutable state objects.