more or less fleshed out EXT_direct_state_access implementation