nit  c static constructors are evil due to their random order or initialization deinitialization anyway  so please please never use them  the fact that this is accessed from onexit only makes it clearer consider using an emugl  lazyinstance here  see comment below 