OpenGL Gradient Background
First of all, hello to my new blog :) I’ve made a bunch of blog-writing attempts in the past, with a little-to-no success. So let’s hope this time it works out!
In this short article, I’ll describe a neat little function that allows you to have a gradient backgrounds in your OpenGL applications, like the snazzy 3D apps (Blender and Maya pictured below) do these days.
Our goal is to create a single function, working very much like the glClearColor, but rather than a single color it should be to accept arguments for colors at the top and bottom of the window.