I don’t know why but the screen is rendering just while, with neither of the two planes appearing
It’s set so one plane is above and one is below, I’ve looked through and can’t see anything wrong with it.
I’m using LWJGL and java
public void Game() { float playerX = 0;
float playerY = 10;
float playerZ = 0;
float playerYaw = 0;
float playerPitch = 25;
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GL11.glOrtho(-10, 10, -10, 10, 0.1f, 100f);
GL11.glEnable(GL11.GL_DEPTH_TEST);
while(!Display.isCloseRequested()){
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
GL11.glClearColor(1, 1, 1, 1);
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GL11.glTranslatef(playerX, playerY, playerZ);
GL11.glRotatef(playerPitch, 1, 0, 0);
GL11.glRotatef(playerYaw , 0, 1, 0);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
GL11.glBegin(GL11.GL_QUADS);
GL11.glVertex3f(-100, 30, -100);
GL11.glVertex3f(100, 30, -100);
GL11.glVertex3f(100, 30, 100);
GL11.glVertex3f(-100, 30, 100);
GL11.glEnd();
GL11.glBegin(GL11.GL_QUADS);
GL11.glVertex3f(-100, 0, -100);
GL11.glVertex3f(100, 0, -100);
GL11.glVertex3f(100, 0, 100);
GL11.glVertex3f(-100, 0, 100);
GL11.glEnd();
if(Keyboard.isKeyDown(Keyboard.KEY_RIGHT))
playerYaw += 1;
if(Keyboard.isKeyDown(Keyboard.KEY_LEFT))
playerYaw -= 1;
if(Keyboard.isKeyDown(Keyboard.KEY_UP))
playerPitch += 1;
if(Keyboard.isKeyDown(Keyboard.KEY_DOWN))
playerPitch -= 1;
Display.update();
}
}