Code cleanup for GLFrameBuffer in examples/common

- cleanup some duplicated code
- change the background color ramp function to make UI more readable