Removed unnecessary OpenGL commands. Re #8099
Merge branch 'bugfix/8099_mountain_lion_opengl_errors' into develop