This is my code:
Update:
if (alphaIn > 0){
alphaIn--;
}
System.out.println(alphaIn);
Render:
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(0, 0, 0, alphaIn);
glBegin(GL_QUADS);
glVertex2f(0, 0);
glVertex2f(Display.getWidth(), 0);
glVertex2f(Display.getWidth(), Display.getHeight());
glVertex2f(0, Display.getHeight());
glEnd();
glDisable(GL_BLEND);
The problem is that glColor4f doesn’t change the alpha channel inbetween 0-255. It only changes when alphaIn is 255 or 0 specifically. So, essentially, it stays black until alphaIn reaches 0, then instantly turns white; completely defeating its purpose.
Insight is appreciated.