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.
GLU.gluPerspective((float) 110, (float) DisplayInformation.getDisplayCurrentWidth() / DisplayInformation.getDisplayCurrentHeight(), MIN_VIEW_DISTANCE,
GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
Thank you for your time.