add opengl context support