added opengl switch