Added a parameter for a callback function that is called every time the frame is resized