I am trying to make a function that slowly fades to black when the player dies. I have all the settings (attenuation, etc.), but I donβt know how to make an OpenGL color mask or something that is required to actually fade the screen to black.
I tried using glClearColor and then glClear, but the results were completely black. I know that it would be technically possible to do this by changing each color attribute of my code dynamically, but I wonder if there is an easier way.
source share