set OpenGL attributes in set_mode