I'm currently coding a little game with the libGdx library and I wanted to have a slight fade in/fade out effect if the screen changes (e.g. from MainMenu into the game).
After some time, I've got the idea, that I draw a black filled rectangle over the whole screen with an increasing alpha value. At the point where the alpha value is 0.0f (so, the whole screen is black) I change the screen to my game, where at this point my alpha value is getting bigger (so it will be transparent more and more).
So I implemented something like this:
// init Gdx.gl.glEnable( GL10.GL_ALPHA_TEST ); // [...] // render Gdx.gl10.glAlphaFunc( GL10.GL_GREATER, 0 ); // render my quad
While having my project setting up with LwjglApplicationConfig.useGL20 = false; it will work very well.
But enabling gl20, it won't start, saying that there is a problem with GL10.GL_ALPHA_TEST
So I searched if gl20 have something like that... but now it's 30 minutes later and I don't have any solution.
Could you help?
What I have to enable in gl20 ( and setting up) to use alpha like in gl10 ?
Greets,
N1ghtDr34m3r






