make opengl context current before calling a gl function