The next step in my project at the moment is getting smooth transitions between screens. I have watched Oscar's video about it and I liked the idea. The only thing I want to do differently is to not fade in the actual components, but fade out an overlay of black. I have the theory down:

Call for state changeFade out screenChange StateFade in screen

I have been trying to implement it but I am having trouble with glColor4f(); At the moment, I am drawing the overlay like this.

The problem is with glColor4f(); Whenever I make the RGB all zeros, there is just a black screen. Also, whenever I make them 1.0f, The screen has transparency, but there is a hue of whatever color is drawn on the screen right before it. I have tried with glClear(GL11.GL_COLOR_BUFFER_BIT); but that just removes the transparency. I have also tried glClearColor() but I don't know how to work it. If anyone has any idea how to do this, I would greatly appreciate it!

This code fades from black to white while making everything else gray scale... This is a picture of what I mean...

Hmmm... Strange... When I copied the screen to put it on this post, the menu looked like there was no overlay. It just looked normal... Maybe this will help some people solving this problem because I am stumped.

Ok. Now I just feel like a noob. I disabled GL_TEXTURE_2D before drawing the quad and then enabled it again after drawing it. I can get it to go from black to clear to white then back again but I don't know how to get it to fade from clear to black...

I tried incrementing by smaller values... (even .000000000000000000000000000000000000000000001f) but it was still a black screen. I also tried larger values even though I knew they wouldn't do anything.

I think that I should clarify, the main menu only flickers once, then there is black for the rest of the time. It doesn't keep flickering over and over again.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org