[Solved] Visual Glitch

Hi, in my game I am currently drawing everything with immediate mode (glBegin(), glEnd()). There is this strange bug of seeing quads behind drawn quads. How should I go about fixing this?

(The yellow platforms do not go past the blue wall in the code, at certain angles I can see more or less of the yellow quads. The image on the right is a wireframe view.)

If it helps, this is my code I use to init 3D drawing.

		GL11.glMatrixMode(GL11.GL_PROJECTION);
		GL11.glLoadIdentity();
		GLU.gluPerspective((float) 110, (float) DisplayInformation.getDisplayCurrentWidth() / DisplayInformation.getDisplayCurrentHeight(), MIN_VIEW_DISTANCE,
				MAX_VIEW_DISTANCE);
		GL11.glMatrixMode(GL11.GL_MODELVIEW);
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glShadeModel(GL11.GL_SMOOTH);
		GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
		GL11.glClearDepth(1.0f);
		GL11.glEnable(GL11.GL_DEPTH_TEST);
		GL11.glDepthFunc(GL11.GL_LEQUAL);
		GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST);
		Fog.fog();

Thank you for your time.

What are the values of MIN_VIEW_DISTANCE and MAX_VIEW_DISTANCE ?

As a rule of thumb, MAX_VIEW_DISTANCE / MIN_VIEW_DISTANCE should be at most 10,000.

private float MAX_VIEW_DISTANCE = 1000f;
private float MIN_VIEW_DISTANCE = 0.0001f;

I just set MIN_VIEW_DISTANCE to 0.5f and that fixed it, thank you.