fixed ogl < 3 and osx