opengl context creation safer