I have two quads, and I would like to have each one of them on the screen for 5 seconds, then fade to the next one. How could this be done?
My code:
package net.makerimages.Unacrawl.stateSys;
import net.makerimages.Unacrawl.graphics.TextureManager;
import static org.lwjgl.opengl.GL11.*;
/**
* Created by Makerimages on 12.01.14.
*/
public class LogoState extends GameState
{
@Override
public void render() {
TextureManager.bigLogo.bind();
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2f(0, 0);
glTexCoord2f(1, 0);
glVertex2f(0 + TextureManager.bigLogo.getTextureWidth(), 0);
glTexCoord2f(1, 1);
glVertex2f(0 + TextureManager.bigLogo.getTextureWidth(), 0 + TextureManager.bigLogo.getTextureHeight());
glTexCoord2f(0, 1);
glVertex2f(0, 0 + TextureManager.bigLogo.getTextureHeight());
glEnd();
TextureManager.makerLogo.bind();
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2f(0, 0);
glTexCoord2f(1, 0);
glVertex2f(0 + TextureManager.makerLogo.getTextureWidth(), 0);
glTexCoord2f(1, 1);
glVertex2f(0 + TextureManager.makerLogo.getTextureWidth(), 0 + TextureManager.makerLogo.getTextureHeight());
glTexCoord2f(0, 1);
glVertex2f(0, 0 + TextureManager.makerLogo.getTextureHeight());
glEnd();
}
}