Modified HW3 code for OpenGL GLFW refraction